Hi everyone,
I am trying to render a nice chart, with 3 datasets.
2 of them are sensibly identique, it's not a stacked renderer, so i need to make it more readable.
If I can find a way to customize the alphaforeground for each plot, It would really help.
I have checked all the differents demos, and none of them can fit the configuration I need.
Do you know if there is a way to customize ?
Ex :
[solved] custom foregroundAlpha for an XYStepAreaRenderer
[solved] custom foregroundAlpha for an XYStepAreaRenderer
Last edited by BigDong on Wed Jul 25, 2012 2:48 pm, edited 1 time in total.
-
- Posts: 513
- Joined: Wed Sep 12, 2007 3:18 pm
Re: custom foregroundAlpha for an XYStepAreaRenderer
Have you tried overriding getItemPaint()?
Re: custom foregroundAlpha for an XYStepAreaRenderer
How would that help ?
getItemPaint wrote:Returns the paint used to fill data items as they are drawn.
Returns:
The paint (never null).
-
- Posts: 23
- Joined: Mon Dec 13, 2010 10:23 am
- antibot: No, of course not.
Re: custom foregroundAlpha for an XYStepAreaRenderer
By overriding it, you could apply some alpha value to the paint before forwarding it. Whenever the paint is needed from the painting methods, they will use that modified paint.
That's at least what I think he meant by his suggestion. Sounds like a good idea, that might work.
That's at least what I think he meant by his suggestion. Sounds like a good idea, that might work.
Re: custom foregroundAlpha for an XYStepAreaRenderer
Hi again, thanks, it work.
I didn't use getItemPaint, I just had to change my colorList with Color(r,g,b,a) and it worked great.
Thanks for the idea
I didn't use getItemPaint, I just had to change my colorList with Color(r,g,b,a) and it worked great.
Thanks for the idea
-
- Posts: 513
- Joined: Wed Sep 12, 2007 3:18 pm