Hi,
I need to append data to uniformHeatmapDataseries on each interval. So ,X Range keeps increasing ..How to append data to uniformHeatmapDataseries ?
- deepak b asked 5 years ago
- You must login to post comments
It’s not actually possible to append data to a heatmap, as a heatmap renders a 2-dimentional array which is a fixed size when you create the heatmap.
However, it is possible to update the heatmap array while keeping it the same size,
see https://www.scichart.com/documentation/win/current/The%20Heatmap%20Type.html
int cellHeight = 200;
int cellWidth = 300;
var data = new double[cellHeight, cellWidth];
double startX = 0;
double stepX = 1;
double startY = 0;
double stepY = 1;
var heatmapDataSeries = new UniformHeatmapDataSeries<double, double, double>(data, startX, stepX, startY, stepY);
// ...
// Update some data and force a refresh of parent chart
data[5,10] = 123.45d;
heatmapDataSeries.InvalidatateParentSurface(RangeMode.None);
Or set an entirely new array in the constructor with a different size
var data = new double[cellHeight, cellWidth];
// TODO: Fill the data[,] array with values to represent your heat values
double startX = 0;
double stepX = 1;
double startY = 0;
double stepY = 1;
var heatmapDataSeries = new UniformHeatmapDataSeries<double, double, double>(data, startX, stepX, startY, stepY);
I would recommend if you can, keeping the same size, as new array will cause frequent garbage collections.
Let me know if this helps,
Best regards,
Andrew
- Andrew Burnett-Thompson answered 5 years ago
- You must login to post comments
Please login first to submit.