Group: Forum Members
Last Active: 11 Years Ago
Posts: 33,
Visits: 1
|
Hi,
I have X-axis configured for as a DateTimeScale. I have also added DataPanTool and DataZoomTool in my chart controller. Now, when user zoom in/out or scroll threw chart, I would like to change my X-axis range. Below is my code to configure NDataZoomTool:
nChartControl1.ServerSettings.EnableTiledZoom = true; nChartControl1.ServerSettings.TileCacheSize = 3000; NChart chart1 = nChartControl1.Charts[0];
NDataZoomTool dzt = (NDataZoomTool)nChartControl1.Controller.Tools.FindToolOfType(typeof(NDataZoomTool)); dzt.ZoomOutResetsAxes = true; dzt.Exclusive = true; dzt.Enabled = false; dzt.AllowYAxisZoom = false; dzt.AllowXAxisZoom = true; dzt.XAxisId = (int)StandardAxis.PrimaryX;
chart1.Axis(StandardAxis.PrimaryX).ScrollBar.Visible = true; chart1.Axis(StandardAxis.PrimaryY).ScrollBar.Visible = false;
How can I change my X-axis range on zoom in/out OR on scroll change?
Thanks, Bhumi
|