Chart.Scatter
Chart.Scatter copied to clipboard
Bug: scaleOverride floating point error
When incrementing with scaleStepWidth containing floating point numbers there is a rounding error that courses really long label values. This doesn't occur with the standard charts in chart.js, when using the same scaling. Made a hack fix by using Math.round in line 295.
labelsArray[index] = helpers.template(templateString, { value: (graphMin + Math.round((stepValue * (index)) * 100) / 100).toFixed(stepDecimalPlaces) });
Hi
I'm sorry, that did not answer for a long time. Could you give me an example on jsfiddle.net or similar site? I will use this as an error correction criterion.