PR - Chart Mean, Median and Trend lines

Hi, I added a feature to cartesian charts to display Mean, Median and Trend lines. Please take a look, I think it turned out ok.

Chart overlay to draw a Constant, Mean, Median and Trend by glutio · Pull Request #509 · radzenhq/radzen-blazor (github.com)

1 Like

Hi @glut,

Thank you for the pull request! This would be a valuable feature indeed.

Let's continue the discussion in github.

I used in my .NET 6 Blazor Server project the RadzenSeriesTrend lines (Trend/Median/Mean/Mode) and for me the solution has some issues.
When using application in standard way everything is OK and the Trend lines load fine. However when on Razor page I change page language (using CookieRequestCultureProvider, so page URL is the same but page is reloaded) the graph with data (RadzenLineSeries) is reloaded correctly, but RadzenSeriesTrendLine inside do not load and in F12 console I have error

Maybe its something on my side, but the main graph loads fine and all data is there, so I dont understand why when selecting language other than english for the application (cookie .AspNetCore.Culture) the TrendLines inside RadzenLineSeries do not load. When selecting english culture everything is OK.

This looks to be a localization issue. We will investigate further and provide a fix.

1 Like

Hi, thanks for reporting this. Are you saying that if you switch to some language it doesn't work but then if you switch back to English it works again? So it's not the switching but the language that's the issue? Or is it the same issue when you switch back to English and it only works on first load? if you have a small repro app please share.

I reproduced the error. One can't rely on Blazor to render invariant culture numbers - for some cultures it renders floating numbers with , as the decimal separator which does not work in HTML / CSS / JS. This has been plaguing us for the longest time :slight_smile:

1 Like