New to Telerik UI for WPF? Download free 30-day trial

How to hide/not show the label connector based on datapoint's value or property.


Product Version 2017.3.913 or later
Product RadChartView for WPF


Choose which label connectors are visible depending on the datapoint.


Define a custom series and override its GetLabelConnector method. The following examples demonstrate how to create a custom ScatterLineSeries and hide the label connector of all points with XValue of 1.

public class CustomScatterLineSeries : ScatterLineSeries 
    protected override List<Point> GetLabelConnector(ChartSeriesLabelPositionInfo info) 
        //info.DataPoint.DataItem will contain the bound object in a data binding scenario 
        var dataPoint = info.DataPoint as ScatterDataPoint; 
        if (dataPoint != null && dataPoint.XValue == 1) 
            return new List<Point>() { new Point(), new Point() }; 
        return base.GetLabelConnector(info); 

        <telerik:ChartSeriesLabelConnectorsSettings x:Key="LabelConnectorSettings" /> 
        <local:CustomScatterLineSeries ShowLabels="True" LabelConnectorsSettings="{StaticResource LabelConnectorSettings}" > 
                <telerik:ScatterDataPoint XValue="1" YValue="2"/> 
                <telerik:ScatterDataPoint XValue="2" YValue="3"/> 
                <telerik:ScatterDataPoint XValue="4" YValue="5"/> 
                <telerik:ScatterDataPoint XValue="5" YValue="6"/> 
                <telerik:ScatterDataPoint XValue="7" YValue="8"/> 

Figure 1: Custom ScatterLineSeries with one hidden label connector

Custom ScatterLineSeries with one hidden label connector

See Also

In this article