You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #1837 [Chartjs] Improve Y axis formatting example (hellomedia)
This PR was squashed before being merged into the 2.x branch.
Discussion
----------
[Chartjs] Improve Y axis formatting example
| Q | A
| ------------- | ---
| Bug fix? | misleading doc fix
| New feature? | no
| Issues | see description
| License | MIT
Code example in the doc does not just format Y axis, it overrides existing `scales` configuration.
```js
// For instance you can format Y axis
event.detail.config.options.scales = {
y: {
ticks: {
callback: function (value, index, values) {
/* ... */
},
},
},
};
```
This code formats the y-axis and keeps an existing `scales` config untouched, but requires an existing Y axis config.
```js
// For instance you can format Y axis
event.detail.config.options.scales.y.ticks = {
callback: function (value, index, values) {
/* ... */
}
};
```
Commits
-------
101b3e9 [Chartjs] Improve Y axis formatting example
0 commit comments