hello,
i am using cewolf to create a horizontal bar graph which uses jfreechart internally.
i wanted to know if it is possible to change the colors of the bars as my fields are 25 and the colors are getting repeated. kindly help me.
if possible kindly forward me a small code example which sets the color.
mail me if more clarification are required.
thanking you.
shirish
changing colors of graph
Re: changing colors of graph
you could try something like this:
XYPlot plot = new XYPlot(xyDataset, timeAxis, valueAxis);
//color of the lines
Paint[] p = new Paint[] {Color.green.darker().darker(), Color.red, Color.orange, .......... }; //put as many distinct colors as you need here
plot.setSeriesPaint(p);
-NR
XYPlot plot = new XYPlot(xyDataset, timeAxis, valueAxis);
//color of the lines
Paint[] p = new Paint[] {Color.green.darker().darker(), Color.red, Color.orange, .......... }; //put as many distinct colors as you need here
plot.setSeriesPaint(p);
-NR