• Material 3
  • Bootstrap 5
  • Fluent 2
  • Tailwind CSS
  • Fluent 2 High Contrast
Preferences
Mode Selection
Touch
Mouse
Theme Selection
Theme Mode
Localization
*Translated by Google Translator.
Currency

Example of Pie with Legend Template in ASP.NET Core Chart Control

This sample demonstrates custom legend templates in a pie chart visualizing the world's top 5 oil-producing countries — United States, Saudi Arabia, Russia, Canada, and China. Each pie segment reflects the percentage share of production, and the legend displays country flags and daily output in millions of barrels.

DEMO
SOURCE

This sample uses the template property of legendSettings to fully customize legend items. The legendRender event dynamically injects country-specific data — including flag images, color-matched labels, and production volumes — into the legend template at render time.

More information on legend customization in accumulation charts can be found in the documentation.

Transform your ASP.NET Core web apps today with Syncfusion® ASP.NET Core components
145+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab