Skip to content

Commit 417bf89

Browse files
committed
998039: Updated changes.
1 parent 0ff9598 commit 417bf89

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

blazor/chart/legend.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,11 +687,18 @@ To use, add a `LegendItemTemplate` inside any [ChartSeries](https://help.syncfus
687687
```
688688
@using Syncfusion.Blazor.Charts
689689
690+
@* Initialize the chart and configure essential features *@
690691
<SfChart Title="Olympic Medals">
692+
@* Set category axis for country names *@
691693
<ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category" />
692694
695+
@* Show the legend and enable series toggle *@
696+
<ChartLegendSettings Visible="true" />
697+
693698
<ChartSeriesCollection>
699+
@* Gold column series *@
694700
<ChartSeries DataSource="@MedalDetails" Name="Gold" XName="Country" Width="2" Opacity="1" YName="Gold" Fill="#FFD700" Type="ChartSeriesType.Column">
701+
@* Custom legend with icon, label, and total count *@
695702
<LegendItemTemplate>
696703
<div style="display:flex; align-items:center; gap:10px; padding:4px 0;">
697704
<span style="font-size:18px;">🥇</span>
@@ -704,7 +711,9 @@ To use, add a `LegendItemTemplate` inside any [ChartSeries](https://help.syncfus
704711
</LegendItemTemplate>
705712
</ChartSeries>
706713
714+
@* Silver column series *@
707715
<ChartSeries DataSource="@MedalDetails" Name="Silver" XName="Country" Width="2" Opacity="1" YName="Silver" Fill="#898989" Type="ChartSeriesType.Column">
716+
@* Custom legend with icon, label, and total count *@
708717
<LegendItemTemplate>
709718
<div style="display:flex; align-items:center; gap:10px; padding:4px 0;">
710719
<span style="font-size:18px;">🥈</span>
@@ -717,7 +726,9 @@ To use, add a `LegendItemTemplate` inside any [ChartSeries](https://help.syncfus
717726
</LegendItemTemplate>
718727
</ChartSeries>
719728
729+
@* Bronze column series *@
720730
<ChartSeries DataSource="@MedalDetails" Name="Bronze" XName="Country" Width="2" Opacity="1" YName="Bronze" Fill="#CD7F32" Type="ChartSeriesType.Column">
731+
@* Custom legend with icon, label, and total count *@
721732
<LegendItemTemplate>
722733
<div style="display:flex; align-items:center; gap:10px; padding:4px 0;">
723734
<span style="font-size:18px;">🥉</span>
@@ -731,7 +742,6 @@ To use, add a `LegendItemTemplate` inside any [ChartSeries](https://help.syncfus
731742
</ChartSeries>
732743
</ChartSeriesCollection>
733744
734-
<ChartLegendSettings Visible="true" />
735745
</SfChart>
736746
737747
@code {

0 commit comments

Comments
 (0)