Skip to main content
A newer version of this page is available. .

DxChartLegend.CssClass Property

Specifies the name of a CSS class applied to a chart legend.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public string CssClass { get; set; }

Property Value

Type Description
String

A cascading style sheet class’s name.

Remarks

<style>
    .test-legend {  
    background-color: lightgray;  
} 
</style>

<DxChart Data="@SalesData">
    ....
    <DxChartLegend AllowToggleSeries="true" Orientation="Orientation.Vertical" CssClass="test-legend">
        <DxChartTitle Text="Legend">
        </DxChartTitle>
    </DxChartLegend>
</DxChart>

Refer to CSS Classes for more information.

Online Demo

Charts - Legend Customization

See Also