I use the following code so that I can select and scale my parts of the diagram:
chart1.ChartAreas[0].CursorX.IsUserEnabled = true;
chart1.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
chart1.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
chart1.ChartAreas[0].AxisX.ScrollBar.IsPositionedInside = true;
chart1.ChartAreas[0].CursorY.IsUserEnabled = true;
chart1.ChartAreas[0].CursorY.IsUserSelectionEnabled = true;
chart1.ChartAreas[0].AxisY.ScaleView.Zoomable = true;
chart1.ChartAreas[0].AxisY.ScrollBar.IsPositionedInside = true;
It works for a chart with x and y axes of type Integer.

But when I set the value type of the series series1.XValueType = ChartValueType.Time;, I will not increase the x axis.

When I set the types of axis values for a car and add points using, for example chart1.Series[0].Points.AddXY(DateTime.Now.ToLongTimeString(), rand.Next(10, 20));, then scaling works.
How can I x axis be time and still be scalable?
source
share