Back to Devexpress

IChartSeriesLabel.Border Property

blazor-devexpress-dot-blazor-dot-ichartserieslabel-9a1e3a0e.md

latest3.1 KB
Original Source

IChartSeriesLabel.Border Property

Returns label border settings.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
IChartSeriesLabelBorder Border { get; }

Property Value

TypeDescription
IChartSeriesLabelBorder

Label border settings.

|

Remarks

IChartSeriesLabel properties allow you to configure point label settings. To access these settings, use the PointLabel property in a CustomizeSeriesPoint event handler.

The Border property allows you to access and modify the following label border settings:

VisibleAllows you to hide or display label borders.ColorSpecifies the border color.DashStyle | WidthAllow you to customize style and width of the border line.

Example

The following code snippet configures border settings of visible point labels:

razor
<DxChart Data="@WeatherForecasts"
         CustomizeSeriesPoint="@PreparePointLabel"
         Width="100%">
    <DxChartTitle Text="Annual Weather in New York" />
    <DxChartLineSeries SummaryMethod="@(i => i.Average())"
                        ValueField="@((DetailedWeatherSummary i) => i.AverageTemperatureF)"
                        ArgumentField="@(i => new DateTime(2000, i.Date.Month, 1))"
                        Name="Temperature, F"
                        Filter="@((DetailedWeatherSummary i) => i.City == "NEW YORK")">
        <DxChartSeriesLabel Position="RelativePosition.Outside"
                            FormatPattern="{argument:MMMM}: {value:#.##} °F">
            <DxChartSeriesLabelConnector Visible="true"
                                            Width="3" />
            <DxChartFont Size="14" Weight="600"/>
        </DxChartSeriesLabel>
    </DxChartLineSeries>
    @* ... *@
</DxChart>

@code {
    WeatherForecast[] WeatherForecasts;
    // ...

    protected void PreparePointLabel(ChartSeriesPointCustomizationSettings pointSettings) {
        double value = (double)pointSettings.Point.Value;
        if (value > 50 && value < 70)
            pointSettings.PointLabel.Visible = true;
            // ...
            pointSettings.PointLabel.Border.Visible = true;
            pointSettings.PointLabel.Border.Width = 2.5;
    }
}

See Also

IChartSeriesLabel Interface

IChartSeriesLabel Members

DevExpress.Blazor Namespace