How to draw a line over a flex graph

In order to draw a line over a flex graph you can use a CartesianDataCanvas element.
In the following code below you can see how 2 CartesianDataCanvas items are created, then you can use them to draw over the graph

Then use the CartesianDataCanvas instance to draw lines over the graph. the X,Y coordinates for the line are the coordinates of the Graph which makes it easy to connect 2 dots in the graph or create marker lines


avarageCanvas.lineStyle(2,0x0000FF,
.75,
true,
LineScaleMode.NORMAL,
CapsStyle.ROUND,
JointStyle.MITER,
2
);
avarageCanvas.moveTo(avarage_distance_sec_slot, 0);
avarageCanvas.lineTo(avarage_distance_sec_slot,10);