Customize bar colors in XYJfree chart

后端 未结 3 586
日久生厌
日久生厌 2021-01-21 08:49

how to paint different bars in different colors, I tried to use renderer, here is my sample code:

    public IntervalXYDataset createDataset() throws Interrupted         


        
3条回答
  •  灰色年华
    2021-01-21 09:37

    The most flexible approach is to override the getItemPaint() method of AbstractRenderer in a custom XYBarRenderer, as shown here for XYLineAndShapeRenderer.

提交回复
热议问题