-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
circumference option in 'chart.options' is undefined #8531
Comments
According to the docs its set in the dataset options so you will have to go into the data prop instead of the options, also the default value is undefined so you wont get 360 back if it is not being overriden |
@LeeLenaleee I'm not sure because if you go here https://www.chartjs.org/docs/master/charts/doughnut#config-options it's clearly reported: Config OptionsThese are the customisation options specific to Pie & Doughnut charts. These options are merged with the global chart configuration options, and form the options of the chart.
This was taken from master. Therefore I don't understand if the doc is outdated or if there is bug. |
The radial chart options might be a bit misleading. |
Was looking at the wrong part of documentation: https://www.chartjs.org/docs/master/charts/doughnut/#dataset-properties When I override the circumfrence in the options it shows so it looks like it tries to read the option before it got merged |
The options aren't actually merged anymore, but looked up on access. So the wording might also be misleading. |
That means some defaults are not reachable anymore and they must be hard coded from users. |
Or better the fallback logic must be implemented by users and not by proxy. |
https://www.chartjs.org/docs/master/general/options#chart-level-options Looks like the |
@kurkle thank you very much. |
Ok... ignore my previous post. |
I don't know if this a bug or I misunderstood the documentation.
The pie/doughnut charts have got some specific options, like ,
circumference
.From documentation the
circumference
has got a default of 360 and I'm expecting that when I'm invokingchart.options.circumference
I'll get 360 if I didn't set it in the configuration of chart:https://codepen.io/stockinail/pen/RwoxzNZ
It's not clear to me where I'm wrong.
The text was updated successfully, but these errors were encountered: