Back to Devexpress

DxChartLegend.Position Property

blazor-devexpress-dot-blazor-dot-dxchartlegend-882acb09.md

latest1.7 KB
Original Source

DxChartLegend.Position Property

Specifies whether the legend is located outside or inside the chart’s plot.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public RelativePosition Position { get; set; }

Property Value

TypeDefaultDescription
RelativePositionInside

A RelativePosition enumeration value.

|

Available values:

NameDescription
Inside

An element is displayed inside the component.

| | Outside |

An element is displayed outside the component.

|

Remarks

Use the Position property to position the legend inside or outside the chart’s plot.

Note

We do not recommend that you set the Position property to Inside for legends in DxPolarChart and DxPieChart components.

razor
<DxChart Data="@SalesData">
    @* ... *@
    <DxChartLegend Orientation="Orientation.Vertical" HorizontalAlignment="HorizontalAlignment.Left" Position="RelativePosition.Outside">
        <DxChartTitle Text="Legend" />
    </DxChartLegend>
</DxChart>

Run Demo: Charts - Legend Customization

See Also

DxChartLegend Class

DxChartLegend Members

DevExpress.Blazor Namespace