Hello,
Is there a quick way to tell Lightning Chart to "Zoom to extents"?
The app allows the user to switch between default perspective view
m_chart.View3D.Camera.SetPredefinedCamera(PredefinedCamera.Default);
and top 2D view
m_chart.View3D.Camera.SetPredefinedCamera(PredefinedCamera.TopOrthographicZX);
what I would like to do is have it zoom to extents on switching, so it looks like this:
... continued in next post due to image attachment restriction...
Zoom to Extents?
Moderator: Queue Moderators
Re: Zoom to Extents?
desired zoomed 2D view:
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Zoom to Extents?
To fit the axis ranges to contents of series, you can do that like this:
IncludeInAutoFit is per series. With that you pick the series you want to count in the fitting.
Code: Select all
m_chart.BeginUpdate();
m_chart.View3D.SurfaceGridSeries3D[0].IncludeInAutoFit = true;
PointDouble3D p1, p2;
m_chart.View3D.ZoomPanOptions.GetAutoFitRange(out p1, out p2);
m_chart.View3D.XAxisPrimary3D.SetRange(p1.X, p2.X);
m_chart.View3D.YAxisPrimary3D.SetRange(p1.Y, p2.Y);
m_chart.View3D.ZAxisPrimary3D.SetRange(p1.Z, p2.Z);
m_chart.EndUpdate();
IncludeInAutoFit is per series. With that you pick the series you want to count in the fitting.
LightningChart Support Team, PT