You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Legend templates allow you to replace default legend icons and text with custom HTML or Blazor markup for each series. This enables branded styles, richer content (icons, multi-line text, badges), improved readability, and localization.
568
+
569
+
To use, add a `LegendItemTemplate` inside any [StockChartSeries](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.StockChartSeries.html#Syncfusion_Blazor_Charts_StockChartSeries) you want to customize. The rendered content becomes the legend item and can be styled with CSS. Legend interactions (click to toggle series) remain unless [ToggleVisibility](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.StockChartLegendSettings.html#Syncfusion_Blazor_Charts_StockChartLegendSettings_ToggleVisibility) is set to false. Templates work with all legend positions, alignments, and paging.
570
+
571
+
```
572
+
@using Syncfusion.Blazor.Charts
573
+
574
+
@* Initialize the stock chart component and configure its essential features *@
575
+
<SfStockChart Title="AAPL vs GOOGL Stock Price"
576
+
SelectionMode="SelectionMode.Series">
577
+
578
+
@* Display the legend and allow toggling series visibility on interaction *@
0 commit comments