Hello,
I am using a SurfaceGridSeries3D to chart temperature data. We take a measurement once per second and I am using the InsertRowBackAndScroll method to add new measurements each second. The chart is displaying the last 5 minutes worth of measurements.
My question is, Is there a way to use the InsertRowBackAndScroll method, but insert the row to the beginning of the Series collection and not the end? Essentially, I want to rewind the data. I am doing this now by shifting the data manually, but it is much slower than using InsertRowBackAndScoll to add data.
Thanks.
SurfaceGridSeries3D InsertRowBackAndScroll Backwards
Moderator: Queue Moderators
-
- Posts: 1
- Joined: Fri Feb 15, 2019 3:00 pm
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: SurfaceGridSeries3D InsertRowBackAndScroll Backwards
Hello,
LightningChart does not have method for inserting Row (optimal way) in front of surface data. However, I believe you could mimic backwards scrolling by using View3D.ZAxisSecondary3D.
First, you should make Axis visible and Reversed property should be set opposite to primary Axis:
Second, then shifting Surface data, secondary axis should be moved backwards relatively to some big value (lenght of recording):
If you want 'correct' shift, you probably could create corresponding method in the source of LightningChart (I believe you are subscribe of the source code).
Hope this helps.
LightningChart does not have method for inserting Row (optimal way) in front of surface data. However, I believe you could mimic backwards scrolling by using View3D.ZAxisSecondary3D.
First, you should make Axis visible and Reversed property should be set opposite to primary Axis:
Code: Select all
_chart.View3D.ZAxisSecondary3D.Visible = true;
_chart.View3D.ZAxisSecondary3D.Reversed = !_chart.View3D.ZAxisPrimary3D.Reversed;
Code: Select all
private void SetNewDataToSurface(double[] data)
{
//Surface grid series has optimized methods for adding data to back.
SurfacePoint[,] surfaceData = _surface.Data;
double minZ = _currentZ - (_chart.View3D.ZAxisPrimary3D.Maximum - _chart.View3D.ZAxisPrimary3D.Minimum);
double maxZ = _currentZ;
_surface.InsertRowBackAndScroll(data, minZ, maxZ, minZ, maxZ);
minZ = 1000 - _currentZ - (_chart.View3D.ZAxisSecondary3D.Maximum - _chart.View3D.ZAxisSecondary3D.Minimum);
maxZ = 1000 - _currentZ;
_chart.View3D.ZAxisSecondary3D.SetRange(minZ, maxZ);
}
Hope this helps.