Closed scmmishra closed 3 years ago
Thanks for the patch!
I didn’t know about this setting — would it be worth adding it to the docs?
Would you be open to a patch that changes the formatting to use Intl.NumberFormat
instead? E.g. in English, there should be no space between the number and the M
, for example (according to the Unicode CLDR).
Would you be open to a patch that changes the formatting to use
Intl.NumberFormat
instead? E.g. in English, there should be no space between the number and theM
, for example (according to the Unicode CLDR).
Oh wow, looks like this is fixed in the latest frappe-charts@2.0.0-rc14
already! Great! I’ll upgrade to v2 as you suggested in #30. 👍
@scmmishra FYI, since updating to v2, JavaScript errors are getting logged to the DevTools Console:
draw.js:648 Uncaught TypeError: Cannot read property 'nodeName' of undefined
at Object.bar (draw.js:648)
at AxisChart.js:476
at Array.map (<anonymous>)
at r.value (AxisChart.js:473)
at r.value (BaseChart.js:274)
at r.value (BaseChart.js:268)
at r.value (BaseChart.js:160)
at ResizeObserver.boundDrawFn (BaseChart.js:97)
This PR replaces the DOM hack for formatting numbers with the available
shortenYAxisNumbers
option.Here's a preview of the change
P.S. Thanks for creating such an amazing project, I'm glad you found Frappe Charts useful