Pre loader

UniformHeatmapDataSeries and appending data

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hi,

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

This is to plot heat map chart

Thanks
Deepak

Version
5.4
  • You must to post comments
0
0

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:
https://www.scichart.com/documentation/win/current/The%20Heatmap%20Type.html

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.

Best regards,
Andrew

  • 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