Jfreecharc colors

I am using JfreeChart to dipaly graphs on my webpage.


I am trying to use only bold colors to display the graphs basically I do not want to use yellow and replace it with brown.

AbstractRenderer renderer = (AbstractRenderer) plot.getRenderer();
renderer.setSeriesPaint (0,Color.green);
renderer.setSeriesPaint (1,Color.red);
renderer.setSeriesPaint (2,Color.blue);
but still not able to get it work.

Has anyone had this experince before?
Thx for your help
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I'm not quite sure what you're asking.

Are you saying that your color changes aren't taking effect or that you need the definition of the color brown?
applekannaAuthor Commented:
>>Are you saying that your color changes aren't taking effect or that you need the definition of the color brown?

My colr changes are not taking effect.
applekannaAuthor Commented:
Also wanted o know if there was any other way to do this.
Thank you.
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Can't you set the color directly in the page tag?
Can you post a bit more code?

If you're using the cewolf code, are you sure that you've replaced their color setting method with your own (eg. do you change the colors, then they change them back ;-))?
applekannaAuthor Commented:
okie... let me back trak a bit and make my question clear.
Asuming I use the tutorial given in cewolf alone, and do not use any renderer etc.
how do I change the color of the graph lines that are produced in tutorial ...
Thank you.

code from the tutorial modified

<cewolf:chart  id="line" title="Test Graph" type="line"  xaxislabel="Month" yaxislabel="Amount Earned"
<cewolf:producer id="pageViews"/>
<p><cewolf:img chartid="line" renderer="cewolf" width="400" height="300"/>

Isn't it the color attribute of colorpaint?
Actually - Tim Yates may know about this - i think you may be stuck with that particular example as it's using an image for the rendering. I could be entirely wrong though ;-)
applekannaAuthor Commented:
The graph produce s three lines each with a diferenct color I am not sure how cewolf chooses its colors.
I thought in I can give only one color colorpaint which makes me ask one more question, how do I specify  the color for each line in my graph?

i am adding the code from cewolf.tld for colorpaint .

        Fills the area defined by the parent tag with a color.
            The color to be used to fill the parent tag's area.
            The color definition is compatible with the
            HTML one. E.g. black is '#000000' and red is '#FF0000'. However it
            is possible to append two hex numbers for the alpha channel. Thus
            '#FF000080' is red with alpha blending of 50%.

Maybe you should experiment 'manually' with some <point> tags? Here again you can specify color

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mick BarryJava DeveloperCommented:
I found cewolf pretty limited in it capabilities
applekannaAuthor Commented:
>>I found cewolf pretty limited in it capabilities

Can you suggest anything else to use.
Mick BarryJava DeveloperCommented:
Use JFreeChart directly, cewolf doesn't provide access to it's full feature set.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.