简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM