简体   繁体   English

C#.NET交互式图表控件

[英]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. Womp ...解决了我自己的问题,原来我只是在搜索错误的内容。 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 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. 它实质上是使用内置图表控件的HitTest方法来确定在MouseDown上单击了哪个点,并在MouseMove事件中即时更改了该点的X和Y。 Pretty nifty. 很漂亮

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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