Hi,
I am trying to fill an area chart with a gradient fill, (similar to how the barchart renderer does a gradient fill with the gradient paint transformer). In essence i am defining the max and min values of an area chart and filling defining a gradient fill for rectangle enclosing the graph. My shading goes off the moment i resize or zoom into a chart. is there any way to prevent this from happening. I noticed with the bar chart renderer, the setGradientPaintTransformer method is set once when setting the renderer properties, and the shading is kept perfectly on zooms and resizes. How can i do this for an XYArea Chart.???
Please help..
Rendering Gradient Fills
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
You need to modify the (fixed) control points for the GradientPaint once you know the dimensions of the chart (which is not until drawing time). The bar renderer does this as it draws each bar. You could perhaps do this in the initialise() method in the area renderer, since you only want one gradient.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Rendering Gradient Fills
Hi,
Thanks for your speedy reply David. Im not sure how to do this. please can you elaborate?
Thanks
Thanks for your speedy reply David. Im not sure how to do this. please can you elaborate?
Thanks
Rendering Gradient Fills
anybody know how to implement this????




still trying to render a gradient fill
Hi
Anyone know how to implement a the gradient fill i require above?
ridwaan
Anyone know how to implement a the gradient fill i require above?
ridwaan
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
What have you tried so far?
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

