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
- mijothomas asked 7 years ago
- You must login to post comments
Hi there,
i’m going to investigate this, and check your sample, going to be back soon with results
- Nazariy Pelyushkevych answered 7 years ago
- You must login to post comments
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.
- Nazariy Pelyushkevych answered 7 years ago
- You must login to post comments
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);
}
- Nazariy Pelyushkevych answered 7 years ago
- You must login to post comments
Please login first to submit.