You must be logged in to post your query.
Home › Forums › Chart Support › Chart type:pie, not all label are visible
Tagged: chart, label not visible, pie
Hello, i use Chart type pie. But not all label are visible Can you me help please? Thanks
Here is my HTML
<!DOCTYPE HTML> <html> <head> <script type="text/javascript"> window.onload = function () { var chart = new CanvasJS.Chart("chartContainer", { title:{ text: "Where is label5 ?" }, data: [ { type: "pie", legendText: "{indexLabel}", dataPoints: [{"y":3.52941179,"label":"label1"}, {"y":4.70588255,"label":"label2"}, {"y":58.82353,"label":"label3"}, {"y":10.5882359,"label":"label4"}, {"y":4.70588255,"label":"label5"},// > 6.70588255 ok {"y":17.6470585,"label":"label6"} ] } ] }); chart.render(); } </script> <script type="text/javascript" src="https://canvasjs.com/assets/script/canvasjs.min.js"></script> </head> <body> <div id="chartContainer" style="height: 300px; width: 100%;"></div> </body> </html>
Here is my JSFiddle https://jsfiddle.net/cjopyL1m/
@vlad,
IndexLabels / labels in Pie Chart are skipped whenever they get closer to other indexLabels – this behavior is by design. You can workaround this issue by rotating the Pie Chart by setting startAngle as shown in this JSFiddle.
— Vishwas R Team CanvasJS
Thank you very much, you helped me!
You must be logged in to reply to this topic. Login/Register