Skip to main content

ChartSeriesLabelConnectorModel.Visible Property

Specifies the label connector’s visibility state.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public bool Visible { get; set; }

Property Value

Type Description
Boolean

true to display the label’s connector; otherwise, false.

Remarks

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.

The code below hides connectors for all visible point labels.

<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" />
    </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;
        }
    }
}

Chart Series Labels - Connectors

Run Demo: Charts - Series Label Customization

See Also