circumference option in 'chart.options' is undefined
See original GitHub issueI 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 invoking chart.options.circumference
I’ll get 360 if I didn’t set it in the configuration of chart:
var myChart = new Chart(ctx, {
type: 'pie',
data: {
labels: ["Jan", "Feb", "Mar"],
datasets: [{
label: 'dataset',
data: [51, 23, 24],
backgroundColor: 'lightGrey'
}]
},
});
console.log(myChart.options.circumference); // <- my expectation is to see 360. Unfortunately is undefined.
https://codepen.io/stockinail/pen/RwoxzNZ
It’s not clear to me where I’m wrong.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Doughnut and Pie Charts - Chart.js
# Config Options ; circumference, number, 360, Sweep to allow arcs to cover. ; animation.animateRotate, boolean, true, If true, the chart will ...
Read more >Chart.js Doughnut Chart Rendering Wrong - Stack Overflow
I'm trying to get the output of a doughnut chart from 0 degrees to 180 degrees (Half of the circle) for practice, So...
Read more >chart.style | highcharts API Reference
Note that for line series and some other series types, the threshold option is set to null by default. This will in turn...
Read more >Undefined Slope Equation & Examples - Study.com
What Does an Undefined Slope Look Like? The graph of a line with undefined slope. This is the effect of a line defined ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 https://codepen.io/leelenaleee/pen/RwoQMOJ
Ok… ignore my previous post. You marked as bug therefore the answer is clear.