Is there a way I can drag a line in steema tchart?

和自甴很熟 提交于 2019-12-12 03:03:05

问题


i have fastline in my tchart.

I am adding an array to fastline as a source of data.

In run time , fastline is drawn in tchart. now what I want to do is drag a line from particular point of it , move it up and down , etc. and as a result fastline will have changes in the data point values and the shape. Once user does that , I will get the data from fastline to array. Dragging function something like this. http://www.algorithmist.net/qbparam.html so, I can control the line with mouse.

Is it possible?

Thank you.


回答1:


You can use the DragPoint tool for this.

See the example at "All Features\Welcome !\Tools\Drag Point" in the features demo included with the installation.

Here it is an example:

Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line();
tChart1.Series.Add(line1);
line1.fillSampleValues();

Steema.TeeChart.Tools.DragPoint dragPoint1 = new Steema.TeeChart.Tools.DragPoint();
tChart1.Tools.Add(dragPoint1);
dragPoint1.Cursor = System.Windows.Forms.Cursors.Hand;
dragPoint1.Series = line1;


来源:https://stackoverflow.com/questions/15967948/is-there-a-way-i-can-drag-a-line-in-steema-tchart

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!