#12234 closed enhancement (fixed)
[patch][ccla] use consistently dojo.number in charting but avoid to force loading it
Reported by: | cjolif | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.6 |
Component: | Charting | Version: | 1.6.0b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
scaler/common.js is not relying on i18n dojo.number API to output the numbers of the charting axis.
plot2d/Pie.js and plot2d/Spider.js are partly relying on dojo.number (if fixed precision is required) and partly not (if fixed precision is not required).
In order to comply with dojox.mobile guideline, to optimize charting for mobile it would be good not to force loading dojo.number (and thus dojo.i18n). This is similar to http://bugs.dojotoolkit.org/ticket/12208 that avoid forcing dijit import.
This patch consists in:
1/ making sure number formatting is consistent across scaler & plot2d (bug fix?)
2/ that this number formatting is using dojo.number when available and Number.toFixed/toString when not available (enhancement)
Attachments (1)
Change History (6)
Changed 10 years ago by
Attachment: | number.patch added |
---|
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Milestone: | tbd → 1.6 |
---|
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
note that, among other things, dojo.number patches an IE bug where toFixed improperly rounds 0.5-0.9 with toFixed. Hard to believe it, but I think that bug still exists in the latest IE.