color of bars in barchart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
oosiris

color of bars in barchart

Post by oosiris » Tue Oct 04, 2005 11:20 pm

I want to change the color of a few bars in my barchart. how can i do that ? Also i want to change the default colors used for the rendering of linecharts as they are very light. can anybody help

poppins
Posts: 10
Joined: Thu Sep 01, 2005 12:17 pm
Location: India

color of bars in barchart

Post by poppins » Wed Oct 05, 2005 6:25 am

If you are using a CategoryPlot to draw the chart, then you can use setSeries() method of the CategoryItemRenderer class. It will allow you define colors for each different series., hence making the bars look different.

oosiris

Problem solved

Post by oosiris » Sun Oct 09, 2005 2:11 pm

Finally got the thing done by extending the default bar renderer class and assigning specific colors to specific bars

Locked