shape « Color « JFreeChart Q&A





1. How to change the color of a single data item shape?    jfree.org

Hi, I have a standard XY line chart with visible and filled items. What I need is to change the item shape color whenever the user clicks on it. I wrote a mouse listener below and registered it. The code looks like this: ChartPanel panel = new ChartPanel(chart); frame.add(panel); panel.addChartMouseListener(new ChartMouseClicksListener()); public class ChartMouseClicksListener implements ChartMouseListener { public void chartMouseClicked(ChartMouseEvent event) ...

2. same shapes, different colors    jfree.org

Hi, I have a dynamic number of datasets and for each one, I use a different renderer so the shapes and the colors are different for each dataset. I would like to have to have the same shape for all the datasets but still different colors. Does anybody knows if it's possible? Thank for helping me. Maxime

3. regarding line and shape color    jfree.org

Hi I know how to change colors of the items in the same series. In general when I set the color using setPaint() method, it applies the color to all the items as well as the line joining them. My requirement is to change the color of the line joining them. Please help me if this possble. Thanks in advance..... Shikha ...