Back to Devexpress

DxChartConstantLine.Width Property

blazor-devexpress-dot-blazor-dot-dxchartconstantline-23684c4c.md

latest2.4 KB
Original Source

DxChartConstantLine.Width Property

Specifies the constant line width.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(1)]
[Parameter]
public int Width { get; set; }

Property Value

TypeDefaultDescription
Int321

The constant line width in pixels.

|

Remarks

Use the Width property to change the constant line thickness. You can also specify the Color of the constant line.

The following example changes the color and width of the constant line:

razor
@using System.Drawing

<DxChart Data="@SalesData">
    <DxChartValueAxis>
        <DxChartConstantLine Value="70000"
                             Color="Color.Orange"
                             Width="3">
            <DxChartConstantLineLabel HorizontalAlignment="HorizontalAlignment.Right" Text="Planned Amonut" />
        </DxChartConstantLine>
    </DxChartValueAxis>
    <DxChartLineSeries Name="2017"
                       Filter="@((SaleInfo s) => s.Date.Year == 2017)"
                       ArgumentField="@(s => s.City)"
                       ValueField="@(s => s.Amount)"
                       SummaryMethod="Enumerable.Sum" />
    <DxChartLineSeries Name="2018"
                       Filter="@((SaleInfo s) => s.Date.Year == 2018)"
                       ArgumentField="@(s => s.City)"
                       ValueField="@(s => s.Amount)"
                       SummaryMethod="Enumerable.Sum" />
    <DxChartLineSeries Name="2019"
                       Filter="@((SaleInfo s) => s.Date.Year == 2019)"
                       ArgumentField="@(s => s.City)"
                       ValueField="@(s => s.Amount)"
                       SummaryMethod="Enumerable.Sum" />
    <DxChartTitle Text="Sales Info" />
    <DxChartLegend Position="RelativePosition.Outside" HorizontalAlignment="HorizontalAlignment.Right" />
</DxChart>

See Also

DxChartConstantLine Class

DxChartConstantLine Members

DevExpress.Blazor Namespace