Back to Devexpress

LegendBaseSettings<TComponent, TModel>.Orientation Property

blazor-devexpress-dot-blazor-dot-base-dot-legendbasesettings-2-eb663922.md

latest2.2 KB
Original Source

LegendBaseSettings<TComponent, TModel>.Orientation Property

Specifies whether legend items are arranged vertically or horizontally.

Namespace : DevExpress.Blazor.Base

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(LegendItemOrientation.Auto)]
[Parameter]
public LegendItemOrientation Orientation { get; set; }

Property Value

TypeDefaultDescription
LegendItemOrientationAuto

An enumeration value.

|

Available values:

NameDescription
Horizontal

Horizontal orientation.

| | Vertical |

Vertical orientation.

| | Auto |

This option is identical to Horizontal if the HorizontalAlignment property value is Center; otherwise, the Auto option is identical to Vertical.

|

Remarks

The following code snippet aligns the DxBarGauge legend to the left and arranges its items horizontally:

razor
<DxBarGauge Width="50%"
            Height="500px"
            StartValue="0"
            EndValue="100"
            Values="@Values">
    <DxBarGaugeLegendSettings Visible="true"
                              ItemCaptions="@LegendItemCaptions"
                              BackgroundColor="lightgrey"
                              HorizontalAlignment="HorizontalAlignment.Left"
                              Orientation="LegendItemOrientation.Horizontal"/>
    @* ... *@
</DxBarGauge>

@code {
    double[] Values = new double[] { 47.27, 65.32, 84.59, 81.86, 99 };
    string[] LegendItemCaptions = new string[] { "Metacritic", "Ratingraph.com", "Rotten Tomatoes", "IMDb", "TV.com" };
}

See Also

LegendBaseSettings<TComponent, TModel> Class

LegendBaseSettings<TComponent, TModel> Members

DevExpress.Blazor.Base Namespace