1👍
I think you’ve misread the documentation. It states (emphasis mine):
Once you have created your scale class, you need to register it with the global chart object so that it can be used. A default config for the scale may be provided when registering the constructor. The first parameter to the register function is a string key that is used later to identify which scale type to use for a chart.
Chart.scaleService.registerScaleType('myScale', MyScale, defaultConfigObject);
This is saying that you may provide an object to be passed in to your scale class when it is registered. defaultConfigObject
is simply placeholder text to show the registerScaleType
function signature. So for example you might do this:
Chart.scaleService.registerScaleType('myScale', MyScale, { myprop: true });
- [Chartjs]-ChartJS: create linear x-axis on bar chart
- [Chartjs]-Native element not defined when ngSwitch condition in canvas element
Source:stackexchange.com