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
Starting with Chart.js 2.0 scales can be individually extended. Scales should always derive from Chart.Scale.
So i assumed that every scale type you have should be extensible, but the only extensible ones are Scale and LinearScaleBase.
I don't really know if it is a bug or just as is, but if it is a bug you just have to change every scale you have apart from the LinearScaleBase, to instead of having the Scales as vars you need to add them to Chart namespace.
I got into this issue because i wanted to extend the TimeScale to change a function to fit my data, but i couldn't because it wasn't on Chart namespace, so i just copied the TimeScale you have in src/ to solve the problem.
Thanks and awesome library guys,
Pedro
The text was updated successfully, but these errors were encountered:
It's intended. When writing a custom scale, the scaleService is used to register the type. The lookup function is called getScaleConstructor(type) where type is the string type like 'linear' or 'time'
From the website we have this:
Writing New Scale Types
Starting with Chart.js 2.0 scales can be individually extended. Scales should always derive from Chart.Scale.
So i assumed that every scale type you have should be extensible, but the only extensible ones are Scale and LinearScaleBase.
I don't really know if it is a bug or just as is, but if it is a bug you just have to change every scale you have apart from the LinearScaleBase, to instead of having the Scales as vars you need to add them to Chart namespace.
I got into this issue because i wanted to extend the TimeScale to change a function to fit my data, but i couldn't because it wasn't on Chart namespace, so i just copied the TimeScale you have in src/ to solve the problem.
Thanks and awesome library guys,
Pedro
The text was updated successfully, but these errors were encountered: