adam__moore
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by adam__moore
-
-
Hi there!We are using the pie chart to visualise attained skills and would really like to be able to change the colour of individual slices, so that, fo example, skills not yet achieved could be clear / greyI can't seem to find a simple way of changing individual slice colourHere's the code rendering one chart (it's generated from PHP via an SQL query)<div class="il_ContainerListItem">Your score in Planning is 5 out of 7</div><div class="il_ContainerListItem"> (System model [4] / User [1])</div><div id="ChartDiv1"class="il_ContainerListItem" style="valign:bottom;width:120px;height:150px;display:inline-block"></div><script type="text/javascript" language="javascript">chart1 = new cfx.Chart();chart1.setGallery(cfx.Gallery.Pie);var data1 = [{"Label": "unset", "value":2}, {"Label": "model", "value":4}, {"Label": "user", "value":1}];chart1.setDataSource(data1);chart1.getLegendBox().setVisible(false);chart1.create('ChartDiv1');</script>Thanks in advance for any help!
Adam
How to style individual pie chart slices?
in Styling and Aesthetics
Posted
Yes, that's exactly what I needed, thank-you!
Adam