Scrollbar not woking for X Axis as timescale RRS feed

  • Question

  • Hello,
    I have a  chart with X axis as current time and Y axis as set of values obtained from a device. I plot the values every second and update the graph at runtime.
    I am facing a problem for scrollbar on X axis  when the graph is zoomed.
    The navigation across X Axis works fine if I click somewhere on ScrollBar control.
    But, if I drag the actual scroll bar in the control, it does not move with mouse.
    The graph is initialized using following code :

                trendChartControl.Series[trendSeries.Name].XValueType = ChartValueType.DateTime;

                trendChartArea = trendChartControl.ChartAreas[0];

                chartArea.CursorX.IsUserEnabled = true;

                chartArea.CursorX.IsUserSelectionEnabled = true;


                // Make interval zero so that the user will be able to zoom x-axis runtime

                chartArea.CursorX.Interval = 0;


                //User selectable zoom for Y-axis

                chartArea.CursorY.IsUserEnabled = true;

                chartArea.CursorY.IsUserSelectionEnabled = true;


                //Cursor line colors

                chartArea.CursorX.LineColor = System.Drawing.Color.Black;

                chartArea.CursorY.LineColor = System.Drawing.Color.Black;


                // selection color

                chartArea.CursorX.SelectionColor = System.Drawing.SystemColors.Highlight;

                chartArea.CursorY.SelectionColor = System.Drawing.SystemColors.Highlight;


                // Zoomable property for X-axis

                chartArea.AxisX.ScaleView.Zoomable = true;

                chartArea.AxisX.ScrollBar.IsPositionedInside = true;


                // Zoomable property for Y-axis

                chartArea.AxisY.ScaleView.Zoomable = true;

                chartArea.AxisY.ScrollBar.IsPositionedInside = true;

    Tuesday, February 3, 2009 7:00 AM

All replies

  • I believe you may have the wrong forum.  This forum is for Sync Framework related questions.

    Program Manager, Data Replication and Synchronization - http://msdn.microsoft.com/sync/
    Tuesday, February 3, 2009 9:59 PM