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?

 

 

Parents
  • 30
    posted

    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.

Reply Children
No Data