Class RadzenLegend.
IComponent
IHandleEvent
IHandleAfterRender
RadzenChartComponentBase.SetParametersAsync
RadzenChartComponentBase.ValidateParameters
RadzenChartComponentBase.DidParameterChange
RadzenChartComponentBase.Chart
ComponentBase.BuildRenderTree
ComponentBase.OnInitialized
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.OnAfterRenderAsync
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenLegend : RadzenChartComponentBase, IComponent, IHandleEvent, IHandleAfterRenderGets or sets the template which renders the content of every legend item instead of its text. The marker and the click behavior of the legend item are preserved. The chart measures the rendered legend and reserves the space it needs.
public RenderFragment<LegendItemContext> ItemTemplate { get; set; }
| Type | Description |
|---|---|
| RenderFragment<LegendItemContext> | Gets or sets the template which renders the content of every legend item instead of its text. The marker and the click behavior of the legend item are preserved. The chart measures the rendered legend and reserves the space it needs. |
<RadzenLegend>
<ItemTemplate Context="item">
<div>@item.Text</div>
<em>@(((DataItem)item.Data).Revenue.ToString("C0"))</em>
</ItemTemplate>
</RadzenLegend>Gets or sets the position.
public LegendPosition Position { get; set; }
| Type | Description |
|---|---|
| LegendPosition | Gets or sets the position. |
Gets or sets a value indicating whether this RadzenLegend is visible.
public bool Visible { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this RadzenLegend is visible. |
Initializes this instance.
protected override void Initialize()Shoulds the refresh chart.
protected override bool ShouldRefreshChart(ParameterView parameters)
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters | The parameters. |
| Type | Description |
|---|---|
| bool | true if XXXX, false otherwise. |