开发者

Flex AreaChart gradient fill not applying ratios correctly

When doing a gradient 开发者_StackOverflow中文版fill on an area chart, the gradient ratios are used only between the min and max of the chart. The area below the min is then filled with the last color in the gradient.

To make sure that it was using the ratios only between the min and max I inserted a zero (0) into the chart and the gradient expanded to the full height. I also checked the gradient values by creating a with the gradient fill.

How do i get the ratios to be effective through the entire fill not just between the min and max?


The updateDisplayList method in mx.charts.renderers.AreaRenderer is the culprit here.

I believe you will need to create a custom itemRenderer for the area series based on AreaRenderer. From there I think you need to modify the fill method within updateDisplayList to pass the proper bounding region you want.

The fill portion (on/around line 167) would likely be as follows:

fill.begin(g, new Rectangle(0,0,unscaledWidth,unscaledHeight),null);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜