Pre loader

UniformHeatmapDataSeries and appending data



Do you have any examples for using API UniformHeatmapDataSeries.Append(IEnumerable x, params IEnumerable[] yValues);?

This is to plot heat map chart


  • You must to post comments

Hi Deepak

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;

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.

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies