Back to Devexpress

LegendBaseSettings<TComponent, TModel>.ItemTextPosition Property

blazor-devexpress-dot-blazor-dot-base-dot-legendbasesettings-2-023adc87.md

latest2.7 KB
Original Source

LegendBaseSettings<TComponent, TModel>.ItemTextPosition Property

Specifies the position of legend item captions relative to item markers.

Namespace : DevExpress.Blazor.Base

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(LegendItemTextPosition.Auto)]
[Parameter]
public LegendItemTextPosition ItemTextPosition { get; set; }

Property Value

TypeDefaultDescription
LegendItemTextPositionAuto

An enumeartion value.

|

Available values:

NameDescriptionImage
Bottom

Bottom position.

|

| | Left |

Left position.

|

| | Right |

Right position.

|

| | Top |

Top position.

|

| | Auto |

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

| |

Remarks

The following code snippet positions item captions in the DxBarGauge legend to the left from item markers:

razor
<DxBarGauge Width="50%"
            Height="500px"
            StartValue="0"
            EndValue="100"
            Values="@Values">
    <DxBarGaugeLegendSettings Visible="true"
                              ItemCaptions="@LegendItemCaptions"
                              ItemTextPosition="LegendItemTextPosition.Left"
                              Orientation="LegendItemOrientation.Vertical"
                              HorizontalAlignment="HorizontalAlignment.Left"/>
    @* ... *@
</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