Skip to content

Commit b305d5c

Browse files
committed
998039: Updated changes.
1 parent a28b05e commit b305d5c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

blazor/accumulation-chart/legend.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,19 @@ Legend templates allow you to replace default legend icons and text with custom
395395

396396
To use, add a `LegendItemTemplate` inside any [AccumulationChartSeries](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.AccumulationChartSeries.html) 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.AccumulationChartLegendSettings.html#Syncfusion_Blazor_Charts_AccumulationChartLegendSettings_ToggleVisibility) is set to false. Templates work with all legend positions, alignments, and paging.
397397

398+
**Text** : Gets or sets the text to render for the current legend item in the template. Defaults to the value from the field mapped by AccumulationChartSeries.XName.
399+
400+
**Data** : Gets the data item from AccumulationChartSeries.DataSource bound to the current legend item. Use this to access additional fields (for example, images, badges, or localized text) inside the template.
401+
398402
```
399403
@using Syncfusion.Blazor.Charts
400404
405+
@* Initialize the accumulation chart component and configure its essential features *@
401406
<SfAccumulationChart Title="Mobile Browser Statistics">
402407
<AccumulationChartSeriesCollection>
408+
@* Define a pie series with X and Y mappings and color mapping *@
403409
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users" Name="Browser" PointColorMapping="Color">
410+
@* Render a custom legend item using the template context *@
404411
<LegendItemTemplate>
405412
@{
406413
var info = context as AccumulationChartLegendInfo;
@@ -417,6 +424,7 @@ To use, add a `LegendItemTemplate` inside any [AccumulationChartSeries](https://
417424
</AccumulationChartSeries>
418425
</AccumulationChartSeriesCollection>
419426
427+
@* Display the legend and allow toggling visibility on interaction *@
420428
<AccumulationChartLegendSettings Visible="true" >
421429
</AccumulationChartLegendSettings>
422430
</SfAccumulationChart>

0 commit comments

Comments
 (0)