Use localestring to ensure maximum fraction digits on graph ticks of 6 instead of always rounding
This commit is contained in:
+4
-1
@@ -791,7 +791,10 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
}
|
||||
};
|
||||
|
||||
if (format) options.scales.y.ticks.callback = function (value) { return (formatDivisor ? (value/formatDivisor) : value).toFixed(2) + ' ' + format; };
|
||||
if (format) options.scales.y.ticks.callback = function (value) {
|
||||
if (!formatDivisor) return value + ' ' + format;
|
||||
return (value/formatDivisor).toLocaleString('en-US', { maximumFractionDigits: 6 }) + ' ' + format;
|
||||
};
|
||||
if (max) options.scales.y.max = max;
|
||||
if (stepSize) options.scales.y.ticks.stepSize = stepSize;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user