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

/**

**QQ:252574345

**MSN:lele_love_lomboz@hotmail.com

*/

 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));

阅读更多

没有更多推荐了,返回首页