I think this line
https://github.com/plotly/plotly.js/blob/b5f0316f5c90e466a2a9009eeb876bee627e39c2/src/lib/index.js#L1159
should be
return v || v === '' || v === 0;
@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:
Most helpful comment
Ok, but I would prefer not rendering
<text>elements associated with''strings.