Pre loader

HeatMap InvalidatateParentSurface doest seem to work when DrawTextInCell is set

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,

InvalidatateParentSurface does’t seem to update the text in the heatmap cell however the change seems to be detected and the color value is getting updated. Can you please suggest how to fix this?

Attached is a sample.

Thanks,
-Tom

Version
4.2.3.10185
  • You must to post comments
0
0

Hi there,

I’ve found solution for you: in your TimerOnTick() you have to set your new value to the propper cell in real 2DArray to get text updated

[1] var values = ((IHeatmap2DArrayDataSeries)heatmapSeries.DataSeries).GetArray2D(); — this will return you a real collection
[2] values[YAxis, XAxis] = newValue; — this will set your new value to the collection;

private void TimerOnTick(object sender, EventArgs eventArgs)
    {
        var randomX = _random.Next(0, HeatMapDimensions.AxisXMax+1);
        var randomY = _random.Next(0, HeatMapDimensions.AxisYMax+1);

        for (int YAxis = 0; YAxis < randomY; YAxis++)
        {
            for (int XAxis = 0; XAxis < randomX; XAxis++)
            {
                var newValue = _random.NextDouble() * 100d;
                var oldValue = _array[YAxis, XAxis];
                _array[YAxis, XAxis] = newValue;

                // Solution
                var values = ((IHeatmap2DArrayDataSeries)heatmapSeries.DataSeries).GetArray2D();
                values[YAxis, XAxis] = newValue;
                // End of Solution

                System.Diagnostics.Debug.WriteLine($"Old Value {oldValue} at [{YAxis},{XAxis}] updated to {newValue}");
                _viewModel.SetMax(newValue);
                _viewModel.SetMin(newValue);
                _metaDataContainer.Update(YAxis, XAxis, newValue, _viewModel.Min, _viewModel.Max);

            }
        }
        heatmapSeries.DataSeries.InvalidateParentSurface(RangeMode.ZoomToFit);
    }
  • You must to post comments
0
0

Hi mijothomas,

I’ve investigated your app and it seems that the values of DataSeries were not changed, that is why text shows without changes you can see in your tooltips, still investigating the reason of this.

  • You must to post comments
0
0

Hi there,

i’m going to investigate this, and check your sample, going to be back soon with results

  • You must to post comments
Showing 3 results
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