如何设置jfreechart时间序列图曲线颜色

/**

**QQ:252574345

**MSN:[email protected]

*/

 chart = ChartFactory.createTimeSeriesChart(......);

  XYPlot xyplot=(XYPlot) chart.getPlot();

  XYLineAndShapeRenderer xylinerenderer=(XYLineAndShapeRenderer)xyplot.getRenderer();

 

 

//以下分别给同一个曲线图中3条曲线设置颜色,0为第一条1为第二条,......

    xylinerenderer.setSeriesPaint(0, new Color(0, 0 ,255 ));
    xylinerenderer.setSeriesPaint(1, new Color(255 ,215, 0 ));
    xylinerenderer.setSeriesPaint(2, new Color(0, 238, 118));

你可能感兴趣的:(qq,jfreechart)