Hi, when i use the properties ValueType=ValueType.Double and LabelFormat="c2" of ChartPrimaryYAxis, the value is incorrect, for example in the image below, in the column "SP" the correct value is 959,451.52 and not 95,948,152.00 , how i fix this? i tried to use it without the property ValueType, but the value still incorrect and when i use only valuetype property the value is correct but not in the format i want. i'm using the 19.4.0.48 version of syncfusion blazor
code of chart:
<SfChart Height="450px" Width="100%" Palettes="@palettes">
<ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category" />
<ChartSeriesCollection>
<ChartSeries DataSource="@EstatisticasUF" XName="Filtro" YName="Valor" Type="ChartSeriesType.Column">
<ChartMarker>
<ChartDataLabel Visible="true" />
</ChartMarker>
</ChartSeries>
<ChartPrimaryYAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Double" LabelFormat="c2" Minimum="0" Maximum="@ValorMaxUF">
</ChartPrimaryYAxis>
</ChartSeriesCollection>
</SfChart>
|
<SfChart Height="450px" Width="100%" UseGroupingSeparator="true">
<ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category" />
<ChartSeriesCollection>
<ChartSeries DataSource="@Data" XName="Filtro" YName="Valor" Type="ChartSeriesType.Column">
<ChartMarker>
<ChartDataLabel Visible="true" />
</ChartMarker>
</ChartSeries>
<ChartPrimaryYAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Double" LabelFormat="c2" Minimum="0" Maximum="1000000">
</ChartPrimaryYAxis>
</ChartSeriesCollection>
</SfChart> |
Hi Swetha,
I continue this post because I get same issue. I'm using Blazor Syncfusion v20.1.0.50.
You will find attached 3 files:
Hi Mateus,
We have ensured your reported scenario in latest version 20.1.0.51. Chart y axis labels, data labels and tooltip are formatted properly as per behavior. We have attached the tested sample for your reference.
|
<SfChart UseGroupingSeparator="true"> <ChartPrimaryYAxis LabelFormat="c2"></ChartPrimaryYAxis> </SfChart> |
Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/LabelFormat-1857490251.zip
Kindly specify in which scenario you have faced the reported problem. If you are still facing problem, please try to replicate an issue in above sample or share us issue reproduced sample to validate further from our end.
Regards,
Durga Gopalakrishnan.
Hi Durga ,
this is my result:
So, I suppose it's a globalization issue. In Europe we use comma for decimals...
Best regards
Paolo
Hi Paolo,
We have prepared a sample using Europe locale. Please refer to below sample and change the dropdown to fr in order to select Europe locale.
Screenshot :
If you are still facing problem, please try to replicate an issue in above sample or share us issue reproduced sample to validate further from our end.
Regards,
Sridevi Bharathi.
Hi Paolo,
Here I attached a sample for above reponse. Please refer that.
Regards,
Sridevi Bharathi
Hi Sridevi,
yes I understand the approach to fix this issue.
But unfortunately your code is for a WASM Blazor application. I'm developing a Blazor Server Application. So, for instance, in SyncfusionLocalizer class, at line 24 I cannot find Resources under my application's namespace.... moreover I have to move partially some lines from Program.cs to Startup.cs (.NET Core 5.0) too.
So I'm not sure to fix this problem in my application.
Just a question: the CultureInfo array in CultureSwitcher razor component contains the only culture available? (the name of the variable "supportedCultures" suggests this)
Thank you
Paolo
Hi Sridevi,
I have found answers to my above questions here:
https://blazor.syncfusion.com/documentation/common/localization?cs-save-lang=1&cs-lang=csharp
And following the instructions for setting culture in a static approach.
But now, if I use it as culture (for Italian), this problem is still there (I mean the added zeroes as per comma for decimal issue), but I added a new problem: in a Syncfusion grid, as well in the same chart, the euro symbol is wrong.
Id I use the fr as culture, when I load the chart page I get an exception:
System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at Syncfusion.Blazor.Charts.Chart.Internal.ChartHelper.GetLabelText(Point currentPoint, ChartSeriesRenderer seriesRenderer)
So... I'm so far from a solution!
Regards
Paolo
Hi Paolo,
We have considered your reported scenario as bug and logged a defect report for this issue. This fix will be available in our upcoming weekly patch release which is scheduled to be rolled out on 17th May 2022. 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/34659/localization-is-not-proper-for-european-cultures
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.
Regards,
Durga Gopalakrishnan.
Thank you Durga,
Yes I think so; also because the tooltip works perfectly (I mean without localization configuration, it takes the browser/OS settings; and values are correctly reported ). So I think there is something it doesn't work properly in labels values representation. Moreover the localization symbols are, for Europen cultures, wrong as euro symbol.
I'll wait for next release.
Best regards
Paolo Capirci
Hi Paolo,
Most welcome. We will include the fix as per mentioned timeline. We appreciate your patience until then.
Regards,
Durga Gopalakrishnan.
Hi Paolo,
We are glad to announce that our v20.1.0.56 patch release is rolled out; we have added the fix for reported issue. You can use the latest Syncfusion.Blazor.Charts NuGet package.
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,
Durga Gopalakrishnan.
Hi Durga,
yes, it works perfectly now!
Thanks for the update
Best regards
Paolo
Hi Paolo,
Most welcome. Please get back to us if you need any further assistance. We are always happy in assisting you.
Regards,
Durga Gopalakrishnan.
Hi support,
I moved my application (see previous comments) from .NET 5 and Syncfusion Blazor
v20.1.0.56 (that fixed the issue), to .NET 6 using Syncfusion Blazor v20.4.0.42.
Unfortunately this new version (I know it's not the latest, but still recent) seems to have a regression on this topic. May you verify please?
Correct version (.NET 5 +
v20.1.0.56)
Bug version (.NET 6 + v20.4.0.42):
As you can see, tooltips are fine in both the environments, but the data labels not. Please note that both are localized in it-IT, and that the datasource are exactly the same for both version (I consume a REST API, the same API: only razor component are different, but equal in code).
Thank you
Best regards
Paolo
Paolo,
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 14th February 2023. 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/40720/chart-datalabel-is-not-proper-for-localization
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.
Paolo,
We are glad to announce that our v20.4.0.50 patch release is rolled out; we have added the fix for reported issue. You can use the latest Syncfusion.Blazor.Charts NuGet package.
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.
Hi Durga ,
yes I confirm: bug fixed.
Best regards
Paolo
Paolo,
Please get back to us if you need any other concerns. We are always happy in assisting you.