Hi,
I'm having issues with updating the heatmap axis labels. It seems if I update the axis labels and heatmap data at the same time, the axis labels do not update till I update the heatmap data again.
It's as if refreshing the axis labels is always one step behind. I've shared sample code for a minimal repro below. You will see that if you click the UpdateAxisAndData button, even though I am setting both the heatmap data and axis labels, and calling StateHasChanged, the heatmap shows updated data, but not updated axis labels. It's only after clicking the UpdateAxisAndData button a second time that the axis is updated in the UI
@page "/test"
@using Syncfusion.Blazor.HeatMap
<h3>Test</h3>
<button @onclick="@UpdateAxis">Update Axis</button>
<button @onclick="@UpdateAxisAndData">Update Axis And Data</button>
<SfHeatMap DataSource="@HeatMapData" Width=100% Height=90%>
<HeatMapXAxis Labels="@XAxisLabels" OpposedPosition="true"></HeatMapXAxis>
<HeatMapYAxis Labels="@YAxisLabels"></HeatMapYAxis>
<HeatMapLegendSettings Visible=false></HeatMapLegendSettings>
<HeatMapPaletteSettings Type="PaletteType.Gradient">
</HeatMapPaletteSettings>
</SfHeatMap>
@code {
int?[,] HeatMapData = new int?[1, 1] { { 5 } };
string[] XAxisLabels = new string[] { "xAxisLabel" };
string[] YAxisLabels = new string[] { "yAxisLabel" };
void UpdateAxis()
{
XAxisLabels = new string[] { "UpdatedAxis" };
StateHasChanged();
}
void UpdateAxisAndData()
{
XAxisLabels = new string[] { "UpdatedAxisAndData" };
HeatMapData = new int?[1, 1] { { 2 } };
StateHasChanged();
}
}