Skip to main content

ChartSeriesLabelConnectorModel.Width Property

Specifies the label connector’s width in pixels.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.2.dll

NuGet Package: DevExpress.Blazor


public int Width { get; set; }

Property Value

Type Default Description
Int32 1

The connector’s width.


The Connector property returns instances of the ChartSeriesLabelConnectorModel class. Use this property in the CustomizeSeriesPoint event handler to specify the label connector’s color, width, and visibility state.

The code below uses the Width and Color properties to display point labels with 5 px red connectors.

<DxChart Data="@WeatherForecasts" CustomizeSeriesPoint="@PreparePointLabel">
    <DxChartLineSeries AggregationMethod="@(i => (int)i.Average())"
                       ValueField="@((WeatherForecast i) => i.TemperatureF)"
                       ArgumentField="@(i => i.Date.Date)"
                       Name="Temperature, F">
        <DxChartSeriesLabel Position="RelativePosition.Outside">
            <DxChartSeriesLabelConnector Visible="true" />
    <DxChartLegend Position="RelativePosition.Outside" />

@code {
    WeatherForecast[] WeatherForecasts;
    protected void PreparePointLabel(ChartSeriesPointCustomizationSettings pointSettings) {
        double value = (double)pointSettings.Point.Value;
        if (value > 25 && value < 75) {
            pointSettings.PointLabel.Visible = true;
            pointSettings.PointLabel.BackgroundColor = System.Drawing.Color.Red;

            pointSettings.PointLabel.Connector.Width = 5;
            pointSettings.PointLabel.Connector.Color = System.Drawing.Color.Red;

Chart Series Label Connectors - Color

To specify a point label’s background color, use the BackgroundColor property.

Run Demo: Charts - Series Label Customization

See Also