Articles in this section

How to Format the Tooltip and Data Labels in Blazor Charts?

This article explains how to format the tooltip and data labels in Syncfusion Blazor Accumulation Charts.

Formatting tooltip and data labels

In Blazor Accumulation Charts, you can customize the format of data labels and tooltips using the following properties:

Example: Format tooltip and data labels in an Accumulation Chart

The following example demonstrates how to format the tooltip and data labels using currency formatting:

@using Syncfusion.Blazor.Charts

<SfAccumulationChart Title="Mobile Browser Statistics">
   <AccumulationChartSeriesCollection>
       <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
             <AccumulationDataLabelSettings Visible="true" Format="C1"></AccumulationDataLabelSettings>
       </AccumulationChartSeries>
   </AccumulationChartSeriesCollection>
   <AccumulationChartTooltipSettings Header="" Format="${point.x}: $${point.y}" Enable="true"></AccumulationChartTooltipSettings>
</SfAccumulationChart>

@code {
   public class Statistics
   {
       public string Browser { get; set; }
       public double Users { get; set; }
   }

   public List<Statistics> StatisticsDetails = new List<Statistics>
   {
       new Statistics { Browser = "Chrome", Users = 37.3 },
       new Statistics { Browser = "UC Browser", Users = 17.4 },
       new Statistics { Browser = "iPhone", Users = 19.6 },
       new Statistics { Browser = "Others", Users = 4.2  },
       new Statistics { Browser = "Opera", Users = 11.7 },
       new Statistics { Browser = "Android", Users = 12.8 },
   };
} 

Output

The following screenshot illustrates the formatted tooltip and data labels in the chart:

msedge_n4MJCiXT8P.png

Live Sample

You can try this feature in the live sample

Conclusion:

We hope you found this guide helpful in learning how to format tooltips and data labels in Blazor Charts. For more features, visit our Blazor Charts feature tour page to learn about its other groundbreaking features, documentation, and how to quickly get started with configuration specifications. You can also explore our Blazor Charts example to understand how to create and manipulate data.

For current customers, our Blazor components are available on the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to evaluate our Blazor Charts and other Blazor components.

If you have any questions or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, support portal, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied