Gradient fill under the line XYPlot chart in JFreeChart?
问题 Can I add the gradient filling to the XYPlot chart in JFreeChart? Example below: 回答1: I haven't tried it, but org.jfree.chart.renderer.xy.StackedXYAreaRenderer has a setSeriesFillPaint() method and java.awt.GradientPaint implements the Paint interface. 回答2: I found this works on an XYAreaRenderer plot.getRenderer().setSeriesPaint(seriesIndex, new GradientPaint(0.0f, 0.0f, new Color(255, 0, 0), 0.0f, 0.0f, new Color(0, 255, 255))); 回答3: Just share working code - fixed bugs in other publicly