charts – Make Flex show nearest DataTip in an AreaSeries – Education Career Blog

I’m building a Flex app that includes an area chart, and when users hover over an AreaSeries, I’d like them to see the DataTip for the nearest data point in the series. The problem is that as far as I can tell (and I should admit at this point to being fairly new to Flex), mouseSensitivity is the only way to control when data tips appear.

If I set that to, say, 1000 pixels and tell Flex to only show a single data tip, that sometimes works, but frequently, the nearest data point is not one in the series on which the user is hovering (and in any case, it starts acting odd with such a high mouseSensitivity).

So my question, in short, is how to exert fairly direct control over which data tip is being shown at any given time. Thank you in advance.


Unfortunately i don’t think there would be a straight forward method of achieving this just using a charts default members. I would expect you’d need to extend the chart component you were using and tie in with the internal workings of the chart. This isn’t such an easy thing to do and the inner workings of the chart components are pretty complex. Something that isn’t helped by a fairly messy implementation inside some of the classes.

There are obviously several directions you could take in solving this particular problem some that are more elegant than others.

It’s defiantly possible but it’s probably not a job for someone that is relatively new to flex. If i were you i would probably try to find a compromise to your requirements until you feel more comfortable delving into the chart components code.

IF you do decide to give it a go then you should come back with specific problems as myself and others are probably reluctant to solve such a big problem.


Keep the hitTest() method in mind: this is often the mouse-related unity of last resort.


Leave a Comment