Search results

Globalization in Blazor Sparkline component

22 Jul 2021 / 1 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.

Copied to clipboard
@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>

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.

Sparkline with globalization and localization