Back to Devexpress

IChartSeriesLabel.Connector Property

blazor-devexpress-dot-blazor-dot-ichartserieslabel-0218570c.md

latest2.5 KB
Original Source

IChartSeriesLabel.Connector Property

Specifies the label’s connector settings.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
IChartSeriesLabelConnector Connector { get; }

Property Value

TypeDescription
IChartSeriesLabelConnector

A series label connector.

|

Remarks

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

Connectors are used to link series points and their labels. The Connector property allows you to specify the color, visibility, and width of a specific connector.

The following code snippet hides connectors for all visible point labels.

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

@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.Connector.Visible = false;
        }
    }
}

Run Demo: Charts - Series Label Customization

See Also

IChartSeriesLabel Interface

IChartSeriesLabel Members

DevExpress.Blazor Namespace