mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-07-08 18:16:08 +00:00
27 lines
664 B
Plaintext
27 lines
664 B
Plaintext
@using Radzen.Blazor
|
|
@if (Chart?.Legend?.Visible == true)
|
|
{
|
|
<div class="@Class">
|
|
<div class="rz-legend-items">
|
|
@if (Chart?.Series != null)
|
|
{
|
|
@foreach (var series in Chart.Series)
|
|
{
|
|
@if (series.ShowInLegend)
|
|
{
|
|
@series.RenderLegendItem()
|
|
}
|
|
}
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
@code {
|
|
[CascadingParameter]
|
|
public RadzenChart? Chart { get; set; }
|
|
|
|
string Class => ClassList.Create("rz-legend")
|
|
.Add($"rz-legend-{Chart?.EffectiveLegendPosition ?? LegendPosition.Right}".ToLowerInvariant())
|
|
.ToString();
|
|
}
|