Skip to content
Success

Changes

Summary

  1. Charts: fix numeric tick labels (commit: fde5350) (details)
Commit fde5350920af09d9bc8c42a094ef6e40ab50da43 by Fritz Schinkel
Charts: fix numeric tick labels

chart.js creates a CategoryScale if labels are set directly on the data.
The CategoryScale itself registers a ticks callback which is overridden
if the labels need to be reformatted. The original callback calls
CategoryScale.getLabelForValue. If the formatters are passed as bound
functions there is no access to the scale and therefore, no access to
CategoryScale.getLabelForValue. Therefore, pass the formatter functions
wrapped in an unbound function that extracts the renderer and the scale.
This function then calls the formatter as it was bound to the renderer
and passes the scale as an argument. The formatters then use the scale
to call CategoryScale.getLabelForValue before custom formatting.
Fix empty label for numeric columns in ChartTableControl.

379927
(commit: fde5350)
The file was modified eclipse-scout-chart/src/table/controls/ChartTableControl.ts (diff)
The file was modified eclipse-scout-chart/src/chart/ChartJsRenderer.ts (diff)