SurfaceGridSeries3D Class is support function named "InsertRowBackAndScroll".
As you know, this function(InsertRowBackAndScroll) is optimized to real time data rendering.
So, I have to know how to use this function in SurfaceMeshSeries3D Class..(Not SurfaceGridSeries3D)
I find a function named "InsertRowBack" instead of "InsertRowBackAndScroll" but, I don't know hot to use it.
Please help me how to use this function(InsertRowBack & InsertRowBackAndScroll is support in SurfaceMeshSeries3D Class?)
I'll waiting for your reply.
Thanks
SurfaceMeshSeries3D don't support "InsertRowBackAndScroll"?
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: SurfaceMeshSeries3D don't support "InsertRowBackAndScrol
No wonder you are wondering especially how to use InsertRowBack. There's problem in that method. It truncated the data to be copied, if SizeZ < SizeX. It's been fixed now and waiting for next maintenance release. My apologies for that.
For SurfaceMeshSeries3D, you might as well use data shifting in a loop. InsertColumnBack and InsertRowBack shifts the data one column earlier or one row earlier, and inserts one column back or one row in the back.
Consider you have a surface mesh of size 100x40.
After a couple of double-clicks it looks like:
For SurfaceMeshSeries3D, you might as well use data shifting in a loop. InsertColumnBack and InsertRowBack shifts the data one column earlier or one row earlier, and inserts one column back or one row in the back.
Consider you have a surface mesh of size 100x40.
Code: Select all
int m_iRow = 0;
int RowLength = 100;
//Initialize chart
chart.BeginUpdate();
chart.ActiveView = Arction.WPF.LightningChartUltimate.ActiveView.View3D;
SurfaceMeshSeries3D mesh = new SurfaceMeshSeries3D(chart.View3D, Arction.WPF.LightningChartUltimate.Axis3DBinding.Primary, Arction.WPF.LightningChartUltimate.Axis3DBinding.Primary, Arction.WPF.LightningChartUltimate.Axis3DBinding.Primary);
chart.View3D.SurfaceMeshSeries3D.Add(mesh);
int iRowCount = 40;
int iColumnCount = RowLength;
SurfacePoint[,] points = new SurfacePoint[iColumnCount, iRowCount];
Random rand = new Random();
for (int iCol = 0; iCol < iColumnCount; iCol++)
{
for (int iRow = 0; iRow < iRowCount; iRow++)
{
points[iCol, iRow].X = iCol;
points[iCol, iRow].Z = iRow;
points[iCol, iRow].Y = 10; // rand.NextDouble() * 100.0;
}
}
m_iRow = iRowCount;
mesh.Data = points;
chart.MouseDoubleClick += new MouseButtonEventHandler(chart_MouseDoubleClick);
chart.EndUpdate();
Code: Select all
void chart_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
chart.BeginUpdate();
//Add one row of data in the back
SurfacePoint[] newRowData = new SurfacePoint[RowLength];
for(int iCol = 0; iCol < RowLength; iCol++)
{
newRowData[iCol].X = iCol;
newRowData[iCol].Z = m_iRow;
newRowData[iCol].Y = 50;
}
m_iRow++;
int iRowCount = chart.View3D.SurfaceMeshSeries3D[0].SizeZ;
SurfacePoint[,] data = chart.View3D.SurfaceMeshSeries3D[0].Data;
//Move old data
for (int iRow = 0; iRow < iRowCount - 1; iRow++)
{
for (int iCol = 0; iCol < RowLength; iCol++)
{
data[iCol, iRow] = data[iCol, iRow + 1];
}
}
//Copy new data in the back
for (int iCol = 0; iCol < RowLength; iCol++)
{
data[iCol, iRowCount - 1] = newRowData[iCol];
}
chart.View3D.SurfaceMeshSeries3D[0].InvalidateData();
chart.EndUpdate();
}
LightningChart Support Team, PT
Re: SurfaceMeshSeries3D don't support "InsertRowBackAndScrol
um..
What's this meaning that ..
int iRowCount = chart.View3D.SurfaceMeshSeries3D[0].SizeZ;
SurfacePoint[,] data = chart.View3D.SurfaceMeshSeries3D[0].Data;
array index?
SurfaceMeshSeries3D is not array..
What's this meaning that ..
int iRowCount = chart.View3D.SurfaceMeshSeries3D[0].SizeZ;
SurfacePoint[,] data = chart.View3D.SurfaceMeshSeries3D[0].Data;
array index?
SurfaceMeshSeries3D is not array..
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: SurfaceMeshSeries3D don't support "InsertRowBackAndScrol
View3D.SurfaceMeshSeries3D is collection, a list.
After creating a SurfaceMeshSeries3D (mesh) object and adding it into the collection by chart.View3D.SurfaceMeshSeries3D.Add(mesh), it becomes the first item in the View3D.SurfaceMeshSeries3D collection. So [0] is a list index, to access the first mesh series.
After creating a SurfaceMeshSeries3D (mesh) object and adding it into the collection by chart.View3D.SurfaceMeshSeries3D.Add(mesh), it becomes the first item in the View3D.SurfaceMeshSeries3D collection. So [0] is a list index, to access the first mesh series.
LightningChart Support Team, PT