Back to Devexpress

DxChartSeriesLabelConnector Class

blazor-devexpress-dot-blazor-0ef7b948.md

latest2.7 KB
Original Source

DxChartSeriesLabelConnector Class

Provides settings for series label connectors.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class DxChartSeriesLabelConnector :
    DxSettingsComponent<ChartSeriesLabelConnectorModel>

Remarks

Use the DxChartSeriesLabelConnector component to display connectors between series points and labels. You can also specify the connector’s color and width.

The following example demonstrates how to:

  • define the label position and connector appearance at the series level;
  • show only labels whose values are between 25 and 75.
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">
            <DxChartSeriesLabelConnector Visible="true" Width="3" />
        </DxChartSeriesLabel>
    </DxChartLineSeries>
</DxChart>

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

Run Demo: Charts - Series Label Customization

Implements

IComponent

IHandleEvent

IHandleAfterRender

IDisposable

Inheritance

Object ComponentBase DxSettingsComponent<DevExpress.Blazor.Internal.ChartSeriesLabelConnectorModel> DxChartSeriesLabelConnector

See Also

DxChartSeriesLabelConnector Members

DevExpress.Blazor Namespace