Hi,
I have successfully created an area chart. i would like the fill color to be a gradient paint. Is it possible to set the gradient paing for the fill of the area chart as you would in when doing bar graphs using the barRenderer?
Please help
Ridwaan
Gradient Filled Area Charts with Outline
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
No, although it would be a nice feature. The difficulty is in doing the transformation of the gradient paint's anchor points - with a bar it is easy, just use the top and bottom of the bar. But for an area chart, you probably want the gradient to run from the overall minimum value to the overall maximum value (for the entire series), and that's a little tricky to work out given the way that JFreeChart goes about drawing the area. Hopefully we'll get this working eventually (and patches are, of course, welcome!).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Gradient Filled Area Charts with Outline
Hi,
If i were to actually set the paint fill for the series to be gradient from the max value to the min value any idea how to go about doing it. It is a relatively simple task of keeping track of my max and min values for a dataset but to translate them to x,y coordiantes??? is it possible to get the coordinates of a plotted point in an area chart. that way i can set the gradient fill to be horiz accross a line from max value to min value, and have it refill whenever the chart is resized??? any ideas or suggestions?
If i were to actually set the paint fill for the series to be gradient from the max value to the min value any idea how to go about doing it. It is a relatively simple task of keeping track of my max and min values for a dataset but to translate them to x,y coordiantes??? is it possible to get the coordinates of a plotted point in an area chart. that way i can set the gradient fill to be horiz accross a line from max value to min value, and have it refill whenever the chart is resized??? any ideas or suggestions?