Localization Issue for Chart Render Exception - under French localization

I'm using latest blazor version 25.1.39 in demo app

Framework like, Blazor webAssembly , We found issue while rendering Chart under French localization. We use multi level labels to support our requirement. Internally , most localization for this multi level labels chart working fine, but under fr-CA if fails rendering with this error which indicates it is internal in the Syncfusion component and it handling of numbers with cultures where comma is the decimal point. For example in fr-CA . (dot) is not a number format but the code seems to be treating it as such.

Image_7888_1713187649118

Error is:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Format_InvalidStringWithValue, 181.5625
System.FormatException: Format_InvalidStringWithValue, 181.5625
at System.Number.ThrowFormatExceptionChar
at System.Number.ParseFloat[Char,Double](ReadOnlySpan1 , NumberStyles , NumberFormatInfo ) at System.Double.Parse(ReadOnlySpan1 s, NumberStyles style, IFormatProvider provider)
at System.Double.Parse(String s, NumberStyles style, IFormatProvider provider)
at System.Double.Parse(String s, IFormatProvider provider)
at System.Convert.ToDouble(String value, IFormatProvider provider)
at Syncfusion.Blazor.Charts.Internal.MultiLevelLabelRenderer.CalculateXAxisLabelBorder(Int32 labelIndex, Double gap, Double startX, Double startY, Size labelSize, TextOptions textOptions, Rect axisRect, Alignment alignment, String path, Boolean isOutside, Boolean opposedPosition, Int32 categoryIndex)
at Syncfusion.Blazor.Charts.Internal.MultiLevelLabelRenderer.CalculateXAxisMultiLevelLabels(Int32 index, Rect axisRect)
at Syncfusion.Blazor.Charts.Internal.CartesianAxisLayout.CalculateXAxisBorder(ChartAxis axis, Int32 index, Rect axisRect)
at Syncfusion.Blazor.Charts.Internal.CartesianAxisLayout.AxisRenderingCalculation(ChartAxisRenderer renderer)
at Syncfusion.Blazor.Charts.Internal.ChartAxisRendererContainer.ComputePlotAreaBounds(Rect newRect)
at Syncfusion.Blazor.Charts.Internal.ChartAxisRendererContainer.HandleChartSizeChange(Rect rect)
at Syncfusion.Blazor.Charts.SfChart.PerformLayout()
at Syncfusion.Blazor.Charts.SfChart.OnAfterRenderAsync(Boolean firstRender)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )


6 Replies

PR Priyansh April 15, 2024 07:26 PM UTC

In Demo App, we got exception for French , however English & German localized correctly without exception . Please get attached demo in zip 

image


image



PR Priyansh April 15, 2024 07:32 PM UTC

Please find Demo Project here 


Attachment: DemoLocalization_328386fe.zip


IG Ilamathi Govindaraj Syncfusion Team April 16, 2024 12:11 PM UTC

Hi Priyansh,


We have considered your reported scenario as bug and logged a defect report for this issue. This fix will be available in our weekly patch release which is scheduled to be rolled out on 23rd April 2024. We appreciate your patience until then. You can keep track of the bug from the below feedback link.


Feedback Link : https://www.syncfusion.com/feedback/53112/localization-issue-caused-in-charts-when-using-french-and-arabic-culture


If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”


Regards,

Ilamathi Govindaraj.



GV Gopalakrishnan Veeraraghavan Syncfusion Team April 23, 2024 01:04 PM UTC

Priyansh,

We are glad to announce that our v25.1.41
patch release is rolled out; we have added the fix for reported issue. You can use the latest Syncfusion.Blazor.Charts NuGet package.

Root cause:

When changing the culture in the chart while using multilevel labels, the grouping separator for double values is not applied properly.

Fix:

We have added the invariant culture to the grouping separator for double values when using multilevel labels.

NuGet Package: https://www.nuget.org/packages/Syncfusion.Blazor.Charts/

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,

Gopalakrishnan Veeraraghavan




PR Priyansh April 25, 2024 02:20 PM UTC

Thank you so much, it works



DG Durga Gopalakrishnan Syncfusion Team April 26, 2024 05:34 AM UTC

Most welcome. Please get back to us if you need any further assistance. We are always happy in assisting you. 


Loader.
Up arrow icon