Hi there,
i am pretty new about using JFreeChart.
I created a line chart using an example but now i need to customize this example.
My graph is a simple line chart with only one LINE
So i need the following :
1) How can i change the foreground color of the line ?
For default the line is red, i'd like to have it BLUE...for instance.
2) I'd like to scale the PLOT, i have the following values on X axis
0,550,560,570,580
How can i make appear the values :
0,555,560,565.... ???
3) My Line chart seems just a bit obfuscate so is there a way to display it
more clearly...probably it is not set a streching ?
Cheers.
Stefano
[/img]
Problem with Line chart !
to change the color, you have to use following...
renderer = plot.getRenderer();
renderer.setSeriesPaint(0,Color.blue) //since you only have one series.
2. domainaxis.setNumberFormatOverride(...) in this metod you can pass proper format (java format) and chart will display that.
3. you can add the chartPanel to JScrollPane and set the layout properly
hope this helps.
renderer = plot.getRenderer();
renderer.setSeriesPaint(0,Color.blue) //since you only have one series.
2. domainaxis.setNumberFormatOverride(...) in this metod you can pass proper format (java format) and chart will display that.
3. you can add the chartPanel to JScrollPane and set the layout properly
hope this helps.