multi color / gradient spline stroke by Y - value

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Post Reply
VaclavTuma
Posts: 1
Joined: Tue Jul 12, 2016 12:57 pm
antibot: No, of course not.

multi color / gradient spline stroke by Y - value

Post by VaclavTuma » Mon Jun 10, 2019 11:49 am

Hello all,
I m wondering if there is easier way to create colored spline with something like a LookupPaintScale or GradientPaint in y-axis.

I have data in time .. simple histogram and in a dataset[0] I have a curve (like trend curve) - using XYSplineRenderer. Till this seems to be clear for me.
As I checked the code, in case of rendering spline, shape is given to g2.draw(shape) in XYSplineRenderer.drawFirstPassShape(). And trully dont sure if is possible affect part of line in y-value as green, part as orange and highest peaks in red.

Before I start to think abut writing custom renderer, is there a way to create it easily?
thx for comments

Václav

Post Reply