Jump to content
Software FX Community

Moving points together with DataChangedByUser

User (Legacy)

Recommended Posts

I have a need to allow the user to rubberband-select multiple points on a

chart, then grab on to one of them and move it up and down (and have the

other points within the selection box move with the point he's moving - in

other words, "sliding" a portion of the chart up and down within the Y

direction while preserving the shape of that section of the chart).

I've got all the ancilliary code done to draw the selection box, figure out

which points fall within it using "PixelToValue", etc. The piece I'm

missing - I need to know what the "last" point was (when the point started

being dragged), and what the "current" point's value is, so that I can

figure out the "Y delta" between the two and apply it to all the OTHER

points within the selection area.

And there I'm stuck. I would assume the "DataChangedByUser" event is what I

need to work with, but no member of the PointLabelEventArgs is leaping out

at me as what to use for these purposes...


Link to comment
Share on other sites

The new value is passed to you but already converted to a label (string) and

can be obtained from the event arguments (Label property).

The old value (right before it is changed) can be obtained from the chart

itself using the Value property. The series and point index also come to you

in the event arguments (Series and Point properties).



Software FX, Inc.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...