Profile Picture

Scroll Axis of zoomed chart

Posted By shweta jain 4 Years Ago
Author
Message
shweta jain
Question Posted 4 Years Ago
View Quick Profile
Junior Member

Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 16, Visits: 192
Hello,
I want to scroll both primary x and primary y axis of chart after zoom.
How can I add this axis scrolling after zoom in the chart?
I have tried by adding NDataPanTool in the chart by taking reference of example of DataPanTool. but it does not work.
- chartControl.Controller.Tools.Add(new NDataPanTool()).
Is it affected by cursor type? I am also using NAxisCursor in the same chart.

Can you Please provide me code for "Axis scrolling in the chart"

Nevron Support
Posted 4 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,000

Hi Shweta,

The following code shows how to configure thechart for zooming and scrolling:

NCartesianChart chart =(NCartesianChart)nChartControl1.Charts[0];
chart.Axis(StandardAxis.PrimaryX).ScrollBar.Visible= true;
chart.Axis(StandardAxis.PrimaryY).ScrollBar.Visible= true;
chart.RangeSelections.Add(new NRangeSelection());

NPointSeries point = new NPointSeries();
point.Values.Add(10);
point.Values.Add(20);
point.Values.Add(30);
chart.Series.Add(point);

nChartControl1.Controller.Tools.Add(newNPanelSelectorTool());
nChartControl1.Controller.Tools.Add(newNAxisScrollTool());
nChartControl1.Controller.Tools.Add(newNDataZoomTool());
nChartControl1.Controller.Tools.Add(newNDataPanTool());

You can also take a look at the examples in the Interactivity / Tools section onhow to configure all the features in each tool individually.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic