You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
716 B
16 lines
716 B
2 years ago
|
@namespace Connected.Components
|
||
|
@inherits Chart
|
||
|
|
||
|
@if (ChartParent?.ChartOptions.DisableLegend != true)
|
||
|
{
|
||
|
<div @attributes="UserAttributes" class="mud-chart-legend">
|
||
|
@foreach (var item in Data)
|
||
|
{
|
||
|
<div class="mud-chart-legend-item" @onclick=@(()=>{ if (ChartParent!=null) { ChartParent.SelectedIndex=item.Index; }}) @onclick:stopPropagation=@(ChartParent!=null)>
|
||
|
<span class="mud-chart-legend-marker" style="@($"background-color:{ChartParent.ChartOptions.ChartPalette.GetValue(item.Index % ChartOptions.ChartPalette.Count())}")"></span>
|
||
|
<TextContent Typo="Typo.body2" Inline="true">@item.Labels</TextContent>
|
||
|
</div>
|
||
|
}
|
||
|
</div>
|
||
|
}
|