Closed json2d closed 4 years ago
Ok so zoomOutPercentage
belongs to this plugin. I was confused by the scoping of it in the options
object.
@json2d Could you please elaborate on this? I'm currently experiencing the same issue as you. I can get the pie charts to render with the labels, but I can't seem to get the zoom to work to allow everything to fit.
As you can see, I've tried to add "zoomOutPercentage" into various areas within the chart options. Unfortunately, I see no difference.
Also, what chart type were you using? Just a normal 'pie' chart or the provided 'outlabeledPie'?
Just a heads up, for anyone that sees this in the future:
You MUST use the 'outlabeledPie' or other plugin-provided outlabeled chart types in order to use the 'zoomOutPercentage' key value.
If you're using ng2-charts, you may run across the 'unsupported chart type' error. To fix this, simply amend your ng2-charts.js file in your node_modules like so:
So in this example code: https://piechart-outlabels.netlify.com/quickstart
there's an option called
zoomOutPercentage
.But I can't find any references to this option in chartjs docs. Where is it from? Is it from another plugin?
I have some issues with getting the entire piechart to fit in the canvas, and it seems this option is suppose to help.