Globalization in Blazor Sparkline Component

17 Dec 20221 minute to read

Globalization is the process of designing and developing a component that can work in different cultures or locations. In the Sparkline component, the Format property is used to globalize number, date, and time values. The tooltip in the following code example is globalized to currency format in the Deutsch culture.

@using Syncfusion.Blazor.Charts

<SfSparkline DataSource="new double[]{ 300.00, 600.00, 400.21, 100.20, 300.70, 200.04, 500.00 }" Height="200px" Width="350px" Format="C">
    <SparklineTooltipSettings TValue="double" Visible="true"></SparklineTooltipSettings>
</SfSparkline>

NOTE

Refer here to configure localization for the Blazor server application, and here for the Blazor web assembly application.

On successful configuration, the Sparkline will be rendered as following.

Localization in Blazor Sparkline Chart