Back to Devexpress

IChartSeriesLabelConnector Interface

blazor-devexpress-dot-blazor-02d23f89.md

latest2.6 KB
Original Source

IChartSeriesLabelConnector Interface

Defines a label’s connector settings.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public interface IChartSeriesLabelConnector

The following members return IChartSeriesLabelConnector objects:

Remarks

The Connector property returns instances of the IChartSeriesLabelConnector interface. Use the Connector property in a CustomizeSeriesPoint event handler to configure the following label connector settings:

ColorSpecifies the label connector’s color.WidthSpecifies the label connector’s width.VisibleSpecifies the label connector’s visibility state.

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

IChartSeriesLabelConnector Members

DevExpress.Blazor Namespace