Profile Picture

How to Update X-axis DateTimeScale on Zoom and on Scroll

Posted By Bhumi Patel 12 Years Ago

How to Update X-axis DateTimeScale on Zoom and on Scroll

Author
Message
Bhumi Patel
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)

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





Similar Topics


Reading This Topic