SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
You cannot append data to a heat map, its a fixed size 2-dimensional array.
You change change the array size, by creating a new UniformHeatmapDataSeries with new 2D array.
You can also update the data, using this technique:
Updating Data in the Heatmap
The UniformHeatmapDataSeries and NonUniformHeatmapDataSeriesdo not
support Append, Insert, Update, Remove like the other DataSeries do.
You can however update the data and force a refresh by simply updating
the array passed in. To do this, use the following code:
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);
Notice above the 2D array data. You can manipulate this array directly but remember to call heatmapDataSeries.InvalidatateParentSurface(RangeMode.None) to tell the parent chart to draw.
Please login first to submit.