I am using Pie chart and setting values for it. I am adding point value as 2, 3, 12, and 5. Pie is rendered but it is assuming total count = 100, and not showing proper round pie. Is there any property available to set total count = 22 instead of 100.
Here is the code:
projectedRunoutPieChart = new cfx.Chart(); var td; td = new cfx.TitleDockable(); td.setText("Projected Runout"); td.setDock(cfx.DockArea.Bottom); projectedRunoutPieChart.getTitles().add(td); projectedRunoutPieChart.getLegendBox().setVisible(false); projectedRunoutPieChart.setGallery(cfx.Gallery.Pie); projectedRunoutPieChart.getAllSeries().getPointLabels().setVisible(true); projectedRunoutPieChart.getView3D().setEnabled(true); projectedRunoutPieChart.getAllSeries().getPointLabels().setFormat("%T Site(s)"); var myPie; myPie = (projectedRunoutPieChart.getGalleryAttributes()); myPie.setExplodingMode(cfx.ExplodingMode.All); myPie.setSliceSeparation(20); myPie.setMaximumLabelMargin(1); var data = projectedRunoutPieChart.getData(); data.setSeries(1); data.setPoints(4); var series = projectedRunoutPieChart.getSeries().getItem(0); series.setGallery(cfx.Gallery.Pie); series.setVolume(100); projectedRunoutPieChart.getPoints().getItem(0, 0).setColor("#2EFE2E"); projectedRunoutPieChart.getData().setItem(0, 0, 2); projectedRunoutPieChart.getPoints().getItem(0, 1).setColor("#F00D0D"); projectedRunoutPieChart.getData().setItem(0, 1, 3); projectedRunoutPieChart.getPoints().getItem(0, 2).setColor("#F6FE0C"); projectedRunoutPieChart.getData().setItem(0, 2, 12); projectedRunoutPieChart.getPoints().getItem(0, 3).setColor("#DFDFD9"); projectedRunoutPieChart.getData().setItem(0, 3, 5); var divHolder = document.getElementById('projectedRunoutPiePanel'); if (divHolder) { projectedRunoutPieChart.create(divHolder); }
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
yogesh
I am using Pie chart and setting values for it. I am adding point value as 2, 3, 12, and 5. Pie is rendered but it is assuming total count = 100, and not showing proper round pie. Is there any property available to set total count = 22 instead of 100.
Here is the code:
Thanks
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.