user3239711
user3239711

Reputation: 649

Gradient color for series in JFreeChart

I have a chart with up to 100 XYseries. At this stage, the plot use default colors for drawing the different lines. Is it possible to have a gradient effect for all the series without setting the color for each series ?

Upvotes: 0

Views: 377

Answers (1)

trashgod
trashgod

Reputation: 205865

Use a custom DrawingSupplier, cited here, and let your implementation of getNextPaint() return the next element in a List<Color>. Construct your list by varying hue or saturation using Color.getHSBColor(), as shown here.

Upvotes: 1

Related Questions