Plotly.js: Blank text is not placed by texttemplate

Created on 9 Sep 2019  路  6Comments  路  Source: plotly/plotly.js

Codepen

cc: @antoinerg

bug

Most helpful comment

Ok, but I would prefer not rendering <text> elements associated with '' strings.

All 6 comments

@etpinard The function templateFormatString actually consider empty string a valid value:
https://github.com/plotly/plotly.js/blob/b5f0316f5c90e466a2a9009eeb876bee627e39c2/src/lib/index.js#L1044-L1047

The change proposed by @archmoj in https://github.com/plotly/plotly.js/issues/4173#issuecomment-529525001 fixes the issue. Hopefully, it doesn't break anything else. Unfortunately, it does break other things.

Ok, but I would prefer not rendering <text> elements associated with '' strings.

@archmoj It doesn't seem like the issue lies with the texttemplate routine itself but rather in how sunburst calls it.

Did you encounter this error with other traces than sunburst?

This commit https://github.com/plotly/plotly.js/commit/9b4a38d6d5052343543fb3445c4ba6f002c669ee should flag the traces other than sunburst for which this issue exists!

Ok so here are the traces affected:

  • [ ] pie
  • [ ] funnelarea
  • [ ] sunburst
Was this page helpful?
0 / 5 - 0 ratings

Related issues

etpinard picture etpinard  路  3Comments

nicolaskruchten picture nicolaskruchten  路  3Comments

maxwell8888 picture maxwell8888  路  3Comments

emanuelsetitinger picture emanuelsetitinger  路  3Comments

HunterMcGushion picture HunterMcGushion  路  3Comments