You must be logged in to post your query.
Home › Forums › Feature Requests & Feedback › Allow for a fixed size of pie charts
Tagged: pie chart, solved
The size of pie charts differs based on the amount of labels attached to it (outside labels). This can be observed in this fiddle and the following image:
Of course, the available size for the chart differs based on how many labels are attached to the pie chart. However, this could be solved by introducing a fixed padding around the pie (the circle) which is reserved for labels even if the chart only has one label.
Adding such a padding will result in generally smaller pies (again, I’m referring to the circle) and seems to be a waste of space if you have only a single pie chart on a page. However, we have multiple pie charts on a single page and it would be great if they had a consistent size.
You can use radius to make pie chart of fixed-size/radius irrespective of number of labels. Here is the updated jsfiddle.
As we checked your fiddle, you are using an older version of CanvasJS (v1.7.0). Kindly use the latest version of CanvasJS and stay updated with all the features and properties available.
thank you for your response. I’m sorry that I missed this property. That should work!
Although it’s a little bit off-topic:
I used the 1.7.0 version from cdnjs because the latest version is only hosted here (canvasjs.com) via HTTP. This is blocked by my browser by default
Mixed Content: The page at ‘https://jsfiddle.net/canvasjs/dvdyfemg/2/’ was loaded over HTTPS, but requested an insecure script ‘https://canvasjs.com/assets/script/canvasjs.min.js’. This request has been blocked; the content must be served over HTTPS.
Of course, I can disable the blocking of scripts that are loaded via HTTP, but I assume that most others block the script too (I’m using Google Chrome version 51.0.2704.103) and therefore might not see the any results in the fiddle by default.
Maybe you could activate https your site via https://letsencrypt.org/ or something simlar :)
You must be logged in to reply to this topic. Login/Register