Closed OmriAroesti closed 3 years ago
This is likely because Plotly.js uses an older (v3) version of d3_format
. We will be able to upgrade to the latest formatter soon :)
Right - until we manage to upgrade d3-format
, the docs should really be pointing to the d3v3 version of the package, as we do in some of the attribute docstrings:
@archmoj we can close this one right?
Resolved by #5125.
As specified here, the formatting is described as the same as d3's formatting language.
However, the d3 documentation this points to mentions that "the sign can be... ( - nothing for zero or positive and parentheses for negative.".
This option, however, is not available to plotly.js. I see that the
d3_format_re
is in fact/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i
, and does not include the ")
" along with "+
", "-
" and "`"(space), so it defaults back to
-`.