Please I need your help...
The following is my line chard part of the code:
final DefaultCategoryDataset dataset = new DefaultCategoryDataset();
final String series1 = xyLabel;
final JFreeChart chart = ChartFactory.createLineChart(
title, // chart title
xLabel, // domain axis label
yLabel, // range axis label
dataset, // data
PlotOrientation.VERTICAL, // orientation
true, // include legend
true, // tooltips
false // urls
);
chart.setBackgroundPaint(new Color(249, 231, 236));
How can I set the color of the line?
Thanks in advance
regards,
Ranjan Yengkhom
Changing Line color -XY Line chart
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Changing Line color -XY Line chart
Code: Select all
CategoryPlot plot = (CategoryPlot) chart.getPlot();
plot.getRenderer().setSeriesPaint(0, Color.RED);
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: Changing Line color -XY Line chart
Thanks David..