Jump to content
JChartFX Community
  • 0

Change default Pie colors


xilton

Question

 This may seem dumb but I just can't get my pie colors changed. I'm able to with bar graphs but not simple 2d pies? I know I'm doing something wrong but what. Works fine for bars. Thanks

 

Javascript code

...

    chart1.setGallery(cfx.Gallery.Pie);
    chart1.getAllSeries().getPointLabels().setVisible(true);
    chart1.getAllSeries().getPointLabels().setFormat("%v");
    chart1.getLegendBox().setVisible(true);   
    chart1.getLegendBox().setDock(cfx.DockArea.Bottom);

    chart1.getSeries().getItem(0).setColor("#FF9900");  

    chart1.getSeries().getItem(1).setColor("#009900");    


    var pie = chart1.getGalleryAttributes();
    pie.setExplodingMode(cfx.ExplodingMode.All);   

...

Link to post
Share on other sites

3 answers to this question

Recommended Posts

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...