Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
Composite Chart Scaling and Scrolling events
posted

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?