Flex chart itemRenderer size
Hi I have a custom class BubbleRenderer that extends CircleItemRenderer. I use this class as an item renderer in a bubble chart. In the bubble chart I listen to itemRollOver event. The bubble chart's maxRadius and minRadius are the same. But I have bubbles with many different sizes because I have my own way of drawing them onto the screen. Now the tricky part is that bubbles are rolled over regardless of their real size. E.g bubble radius is 100. Bubble chart's maxRadius and minRadius are equal to 20. Now the itemRollOver event will be dispatched if I place mouse cursor 20 px from the bubble center. What I want is that the event will be dispatched if I place mouse cursor 100px (that is actual radius of a bubble) from the center of my bubble. I tried to override width and measuredWidth properties with no luck. I digged in Flex framework a little bit to find what property is the itemRollOver event based on. The only thing I found is that ChartBase.proces开发者_开发技巧sRollEvents creates the event based on hitSet parameter. The hitSet parameter is produced by ChartBase.findDataPoints but I don't understand how this method works. One way to solve the problem is to check bubble positions with every mouse move, but I hope there is a simplier solution.
The mouse roll over detection takes place in BubbleSeries.findDataPoints()
As you can see it strongly depends on minRadius
and maxRadius
so it doesn't seem to be a good idea to display a bubble bigger than maxRadius
.
Maybe you could sync z
calculation with your custom bubble rendering logic?
精彩评论