Updating Blazor Bar Series Chart

I am sure I am just missing something but I have looked through the docs and played around with this for a while with no success.

I have a bar series chart that receives periodic updates. The bars themselves and corresponding tool-tips update just as I expect them to when new data is received and is added to the collections. What doesn't work as I expected is that axis numbers are not updating, so the bar can grow past the edge of the chart. I cannot seem to figure out how to update the x axis.

Here is a chart after a few updates, notice the value is greater than the x-axis, I would have expected the chart to re-calculate the best fit like it did with the initial data.

Can someone point me in a direction to clean this up?

Thanks much!


Hi @jaydeboer,

Welcome to the Radzen community!

The chart series update automatically when their Data property changes (by reference - if you just add / remove items it won't be detected as a change). In such cases you can use the Reload method of the chart - you need a reference to it.

<RadzenChart @ref="myChart" />

<RadzenButton Click=@OnClick />

@code {
     RadzenChart myChart;

     void Click()

That was what I was missing link. Thanks so much for the help.