Make Flex show the closest DataTip in AreaSeries

I am creating a Flex application that includes an area chart, and when users hover over AreaSeries, I would like them to see the DataTip for the closest data point in this series. The problem is, as far as I can tell (and I have to admit it's pretty new for Flex at the moment), mouseSensitivity is the only way to control when data prompts appear.

If I set this, say, 1000 pixels, and I say that Flex shows only one piece of data advice, which sometimes works, but often the nearest data point is not one of a series in which the user hangs (and in any case, it starts acting oddly with such high mouse sensitivity).

So my question, in short, is how to pretty directly control which piece of data advice is displayed at any given time. Thank you in advance.

+3
source share
2 answers

Unfortunately, I do not think that there would be a direct method to achieve this, simply using the default elements for diagrams. I expect that you will need to expand the component of the chart that you used and relate it to the internal operation of the chart. It is not so simple, and the internal operation of the components of the diagram is rather complicated. Something that the rather dirty implementation inside some classes does not help.

Obviously, there are several directions that you could take to solve this particular problem, more elegant than others.

, , , -, . , , , , .

, , , , ​​ .

+2

hitTest(): , , .

0

Source: https://habr.com/ru/post/1702670/


All Articles