Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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)

number.patch (2.7 KB) - added by cjolif 10 years ago.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by cjolif

Attachment: number.patch added

comment:1 Changed 10 years ago by Adam Peller

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.

comment:2 Changed 10 years ago by Eugene Lazutkin

Milestone: tbd1.6

comment:3 Changed 10 years ago by Eugene Lazutkin

Resolution: fixed
Status: newclosed

(In [23832]) charting: made the dependency on dojo.number optional, thx, cjolif, !strict, fixes #12234.

comment:4 Changed 10 years ago by Eugene Lazutkin

(In [23875]) charting: all labels should be strings, !strict, refs #12234.

comment:5 Changed 10 years ago by Eugene Lazutkin

(In [23877]) charting: labels should be strings, !strict, refs #12234.

Note: See TracTickets for help on using tickets.