0 Replies Latest reply on Jul 1, 2010 8:55 PM by armalock

    Drawing markers on charts on mouse move

    armalock

      Hi all,

       

      I am stuck at what seems to be a Flex limitation. I have a dynamic number of line chart instances arranged neatly in a VBox. These charts have the same x-axis and I want to correlate them by showing a vertical line through ALL of them when the user is moving the mouse on ONE of them. I used the canvas object as an annotation element. This canvas listens for mouse move event to get the localX and draws a vertical line. So far so good. Now how do I show this line on all of the charts?

       

      Somehow, the different canvas instances of different charts have to be aware of each other so when one is drawing a line, all of them draw the same line at the same horizontal offset.

       

      I tried to be clever and reuse the same canvas instance for all of these charts, however it seems like a canvas instance can only exist in the annotation element of a single chart at a time.

       

      Let me know what you think, thanks!