I'm using a composite chart which consists of 3 chart layers (1 columnchart and 2 linecharts).
I'm trying to use the zoom in/out feature but not able to do so.
I tried reading through the various posts in the forum but couldn't find the right answer.
In my designer, I have..
this.uChartGermany.Scrolling += new Infragistics.UltraChart.Shared.Events.ChartScrollScaleEventHandler(this.uChartGermany_Scrolling); this.uChartGermany.Scaling += new Infragistics.UltraChart.Shared.Events.ChartScrollScaleEventHandler(this.uChartGermany_Scaling);
in my code, I have..
private void uChartGermany_Scrolling(object sender, ChartScrollScaleEventArgs e) { foreach (ChartLayerAppearance layer in this.uChartGermany.CompositeChart.ChartLayers) { if (layer.Visible == true) { switch (e.AxisNumber) { case AxisNumber.X_Axis: layer.AxisX.ScrollScale.Scroll = e.NewValue; break; case AxisNumber.Y_Axis: layer.AxisY.ScrollScale.Scroll = e.NewValue; break; } } } } private void uChartGermany_Scaling(object sender, ChartScrollScaleEventArgs e) { foreach (ChartLayerAppearance layer in this.uChartGermany.CompositeChart.ChartLayers) { if (layer.Visible == true) { switch (e.AxisNumber) { case AxisNumber.X_Axis: layer.AxisX.ScrollScale.Scale = e.NewValue; break; case AxisNumber.Y_Axis: layer.AxisY.ScrollScale.Scale = e.NewValue; break; } } } }
I have put a breakpoint on each of them but when I click on the scrollbar or + / -, the events don't seem to be triggered.
However, I tried it on a normal LineChart and the events were triggered and it hit the breakpoints.
Any ideas anyone?
Problem is fixed.
For some reason it works now after I deleted the original chart and created a totally new one.
Only difference this time was I created all 4 axis first before creating the chart layers.
Previously I created 2 axis, created 1 chart layer, and then created 2 more axis and created the next layer.
Not sure whether that was the cause.
Hi,
I`m glad to heard that you already solve your issue. Maybe will be interesting to take a look at the attached sample where you could find other possible approach to scroll your chart without using Scalling. Let me know if you have any questions.
Regards