Class
ChartLegend

Telerik UI ChartLegend.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class ChartLegend : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseDataVizChildComponentChartLegend

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members ComponentBase.OnInitializedAsync()ComponentBase.OnParametersSetAsync()ComponentBase.StateHasChanged()ComponentBase.ShouldRender()ComponentBase.OnAfterRenderAsync(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.SetParametersAsync(ParameterView)

Constructors

ChartLegend()

Declaration

cs-api-definition
public ChartLegend()

Properties

Align

Specifies the legend align.

Declaration

cs-api-definition
[Parameter]
public ChartLegendAlign? Align { get; set; }

Property Value

ChartLegendAlign?

Background

The background color of the legend. Accepts a valid CSS color string, including hex and rgb.

Declaration

cs-api-definition
[Parameter]
public string Background { get; set; }

Property Value

string

ChildContent

Declaration

cs-api-definition
[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

Height

The legend height when the legend.orientation is set to "vertical".

Declaration

cs-api-definition
[Parameter]
public double? Height { get; set; }

Property Value

double?

OffsetX

The X offset of the chart legend. The offset is relative to the default position of the legend. For instance, a value of 20 will move the legend 20 pixels to the right of its initial position. A negative value will move the legend to the left of its current position.

Declaration

cs-api-definition
[Parameter]
public double? OffsetX { get; set; }

Property Value

double?

OffsetY

The Y offset of the chart legend. The offset is relative to the current position of the legend. For instance, a value of 20 will move the legend 20 pixels down from its initial position. A negative value will move the legend upwards from its current position.

Declaration

cs-api-definition
[Parameter]
public double? OffsetY { get; set; }

Property Value

double?

Orientation

Specifies the legend orientation.

Declaration

cs-api-definition
[Parameter]
public ChartLegendOrientation? Orientation { get; set; }

Property Value

ChartLegendOrientation?

Position

Specifies the legend position.

Declaration

cs-api-definition
[Parameter]
public ChartLegendPosition? Position { get; set; }

Property Value

ChartLegendPosition?

Reverse

If set to true the legend items will be reversed.Available in versions 2013.3.1306 and later.

Declaration

cs-api-definition
[Parameter]
public bool? Reverse { get; set; }

Property Value

bool?

Spacing

The spacing between the labels in pixels when the legend.orientation is "horizontal".

Declaration

cs-api-definition
[Parameter]
public double? Spacing { get; set; }

Property Value

double?

Visible

If set to true the chart will display the legend. By default the chart legend is visible.

Declaration

cs-api-definition
[Parameter]
public bool? Visible { get; set; }

Property Value

bool?

Width

The legend width when the legend.orientation is set to "horizontal".

Declaration

cs-api-definition
[Parameter]
public double? Width { get; set; }

Property Value

double?

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRender(bool)

Declaration

cs-api-definition
protected override void OnAfterRender(bool firstRender)

Parameters

firstRender

bool

Overrides ComponentBase.OnAfterRender(bool)

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides DataVizChildComponent.OnInitialized()

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

Serialize()

Declaration

cs-api-definition
public Dictionary<string, object> Serialize()

Returns

Dictionary<string, object>