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 comment
Share on other sites

3 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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...