Jump to content
JChartFX Community
  • 0

Changing Default Chart Colors


Falkon

Question

Hello,

 

I would like to know how to change the default color values of the charts. We have several pie charts and we would like the individual section colors to be different.

 

According to the following thread: http://community.jchartfx.com/topic/293-css-vs-api-property-settings/

JuanC apparently mentioned that in future builds, all we would have to do is declare an array with the colors we would want to use (the last post in that thread). Is this possible now? If so, how do I do this?

 

Thanks a lot!

 

-Falkon

  • Like 1
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

If you are using any of the palette css files, you can control these colors by changing the AttributesX (0 and above) properties. If you are not using css files, then you will use the points API, such as:

 

chart1.getPoints().getItem(-1,0).setColor("#FF0000"); // This will set the point 0 color to red

---

IG

SFX 

Link to comment
Share on other sites

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