Hi,
Can someone please let me know if it is possible to change the color and shape of one data item in jfreechart?. My scearnio is i am selecting one of the data points and marking it as ignore, so that i don't consider it for my calculations. I want to visually also show that the particular point is marked as ignore hence need to change the color and shape....Please help me...its urgent.
Changing the color and shape of one data item in Jfreechart.
-
- Posts: 10
- Joined: Tue May 02, 2017 7:24 am
- antibot: No, of course not.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Changing the color and shape of one data item in Jfreech
Yes you can do this. You need to determine which renderer class is being used, and create subclass of it where you override the getItemShape() and getItemPaint() methods to return a specific shape and color for the data item that you wish to highlight (or de-emphasise, depending on your requirement).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
-
- Posts: 10
- Joined: Tue May 02, 2017 7:24 am
- antibot: No, of course not.