简体   繁体   中英

Oxyplot C# Win Forms - Spreading out data on x axis

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? Eg to spread the points out on the x axis. Perhaps zooming? I've looked a while and am rather lost.

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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM