Jump to content
JChartFX Community

adam__moore

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by adam__moore

  1. 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 / grey
     
    I can't seem to find a simple way of changing individual slice colour

    Here'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 
×
×
  • Create New...