Profile Picture

The HorizontalStep and VerticalStep for NDataPointDragTool doesn't work

Posted By Enjoyear Guo 12 Years Ago

The HorizontalStep and VerticalStep for NDataPointDragTool doesn't...

Author
Message
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi,

The Horizontal/Vertical steps control how much to offset the data point if the user presses the control key and starts to move the data point using the keyboard. You can intercept the drag event of the tool and snap the data point to a custom location.



Best Regards,
Nevron Support Team



Enjoyear Guo
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (30 reputation)Forum Member (30 reputation)Forum Member (30 reputation)Forum Member (30 reputation)Forum Member (30 reputation)Forum Member (30 reputation)Forum Member (30 reputation)Forum Member (30 reputation)Forum Member (30 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 30, Visits: 1
Hi,

Please see the following code. Why the PointDragTool is still moving the data point in a continuous manner even though I've set the step. Is there any switch to turn on?

private void Form1_Load(object sender, EventArgs e)
{
NChart chart = nChartControl1.Charts[0];
NLineSeries lines = (NLineSeries)chart.Series.Add(SeriesType.Line);
lines.UseXValues = true;
lines.AddDataPoint(new NDataPoint(1,10));
lines.AddDataPoint(new NDataPoint(2.2,20));
lines.AddDataPoint(new NDataPoint(2.8,15));

NSelectorTool selector = new NSelectorTool();
nChartControl1.Controller.Tools.Add(selector);
NDataPointDragTool dataPointDragTool = new NDataPointDragTool();
dataPointDragTool.HorizontalStep = 5;
dataPointDragTool.VerticalStep = 5;
nChartControl1.Controller.Tools.Add(dataPointDragTool);
}

Thank you very much!

Enjoyear



Similar Topics


Reading This Topic