Nick F
Nick F

Reputation: 72

C#.NET Interactive Chart Control

Googled around and couldn't find anything... essentially what I want to do is allow the user to click and drag data points around to new values on a line graph control. The built-in chart control is pretty robust, but as far as I can tell, there's no way to add this kind of interactivity (am I overlooking something?).

I figured it would be a pretty hefty task to do this on my own, so I wondered if anyone had stumbled across this before and made a custom control to do it.

If not, any guidance on where the best place to start would be for making a custom control to do this?

Upvotes: 1

Views: 3798

Answers (1)

Nick F
Nick F

Reputation: 72

Womp... solved my own question, turns out I was just Googling the wrong things. Ended up implementing a version of this:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/2bc4823c-1365-40ee-a239-b6f0c65a539a/datapoint-drawing-position-and-interactivity?forum=MSWinWebChart

It essentially uses the HitTest method of the built-in chart control to determine what point was clicked on MouseDown and just changes that point's X and Y on the fly in the MouseMove event. Pretty nifty.

Upvotes: 1

Related Questions