0

I'm plotting relatively large amounts of data (~ 1 million points). The plot is working fine, but it seems that it is forcing all of the points within the viewable window despite default scrolling being enabled.

Any way to make it more readable? E.g. to spread the points out on the x axis. Perhaps zooming? I've looked a while and am rather lost.

1 Answers1

0

You can add the following lines to enable the zooming function.

chart1.ChartAreas[0].CursorX.IsUserEnabled = true;
chart1.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
chart1.ChartAreas[0].CursorY.IsUserEnabled = true;
chart1.ChartAreas[0].CursorY.IsUserSelectionEnabled = true;

You can certainly choose to zoom only one of the axis.

chart1.ChartAreas[0].AxisX.ScaleView.Zoom(0d, 200d);
uqji
  • 195
  • 1
  • 10
  • Thanks for the response. That would certainly be useful to me later on but isn't exactly what I am asking. I want the program to automatically spread the points along the x axis (outside of the visible range). For example, if I have 1000 points, i wish to be able to say display 200, then have to scroll to view the rest. – ConnorSewell Mar 17 '17 at 12:49
  • Then you need to set up the chart1.ChartAreas[0].AxisX.ScaleView property. Look up the AxisScaleView Class in msdn. In there there will be a Zoom(Double, Double) method to use. I've updated in my answer. – uqji Mar 20 '17 at 05:23