DxChartLegend Class

Specifies options of a chart's legend.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

Declaration

public class DxChartLegend :
    DxComplexSettingsComponent<DxChartLegend, ChartLegendModel>,
    IModelProvider<ChartTitleModel>

Remarks

The DxChart component can display a legend - an explanatory component that helps you identify a series. Each series is represented by an item on a legend. An item marker identifies the series color. An item label displays the series title.

Charts Legend

Use properties provided by the DxChartLegend class to specify the legend settings.

<DxChart Data="@SalesData">
    ...
    <DxChartLegend AllowToggleSeries="true" 
                   Orientation="Orientation.Vertical" 
                   HorizontalAlignment="HorizontalAlignment.Right">
        <DxChartTitle Text="Years">
            <DxChartSubTitle Text="(2017-2019)"></DxChartSubTitle>
        </DxChartTitle>
    </DxChartLegend>
</DxChart>

Online Demo

Charts - Legend Customization

Inheritance

Object
ComponentBase
DxSettingsComponent<DevExpress.Blazor.Internal.ChartLegendModel>
DxComplexSettingsComponent<DxChartLegend, DevExpress.Blazor.Internal.ChartLegendModel>
DxChartLegend
See Also