Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

How do you set global scales config in Chart.js v3

$
0
0

https://www.chartjs.org/docs/latest/axes/styling.html refers to:

Namespace: options.scales[scaleId].grid

("scaleId" doesn't seem to be defined, am assuming it is x or y)

Have tried different permutations

Chart.options.scales = { x: { grid: { ... }} // TypeError: Cannot set property 'scales' of undefined

Chart.defaults.scales = {x: { grid: { ... }} // no complaints but no joy either

yet passing the above as parameters to each new Chart() constructor then it works ok


Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>