Qilk-Sense-Chartjs icon indicating copy to clipboard operation
Qilk-Sense-Chartjs copied to clipboard

formatMeasure Function works incorrectly on negative numbers

Open jmcturnan opened this issue 7 years ago • 1 comments

Hi,

I noticed that when a chart has both negative and positive numbers, the negative numbers are missing their thousand separator.

I partially fixed it for those that are set to 'Auto' with this to the condition: "|| parseInt(e) < -999 "

// if (t.qHyperCube.qMeasureInfo[r].qIsAutoFormat) return parseInt(e) > 999 ? e.toString().replace(".", a).replace(/\B(?=(\d{3})+(?!\d))/g, n) : e.toString().replace(".", a); if (t.qHyperCube.qMeasureInfo[r].qIsAutoFormat) return parseInt(e) > 999 || parseInt(e) < -999 ? e.toString().replace(".", a).replace(/\B(?=(\d{3})+(?!\d))/g, n) : e.toString().replace(".", a);

jmcturnan avatar Mar 07 '17 02:03 jmcturnan

Hi, I have fixed the formatting for negative values. Thank you for your cooperation!

mhamano avatar Mar 07 '17 05:03 mhamano