XYChart: Labels on the line are too dense

Charts for WPF Forum

Posted 3 years ago by Igor Bondarev
Version: 20.1.1
Avatar

Hi,

I have many points in LineSeries in XYChart, so when I move a mouse around several labels appear simultaneously and obscure each other:

Is it possible to make the graph show only one label at the same time? I see that labels on points appear within some distance around the cursor, and this is OK for me, what I want to have is to show label only for the nearest point within this distance, and not for all of them.

XAML for the graph is:

<charts:XYChart Background="White"
                GridLineMajorVisibility="Y" GridLineMinorVisibility="Y">
    <charts:XYChart.XAxes>
        <charts:XYDoubleAxis Name="AxisX" Title="x" Minimum="0"/>
    </charts:XYChart.XAxes>
    <charts:XYChart.YAxes>
        <charts:XYDoubleAxis Name="AxisY" Title="y" Minimum="0"/>
    </charts:XYChart.YAxes>
    <charts:LineSeries LineKind="Spline"
                       ItemsSource="{Binding Path=DiagramData}" XPath="X" YPath="Y"
                       LabelVisibility="PointerProximity">
    </charts:LineSeries>
</charts:XYChart>

Comments (3)

Posted 3 years ago by Igor Bondarev
Avatar
Answer - Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Igor,

Thank you for the sample.  We don't have that option yet but will add a LabelVisibility.PointerProximitySingle option for the next maintenance release that will show a single label tooltip at a time.


Actipro Software Support

Posted 3 years ago by Igor Bondarev
Avatar

Thanks for the response!

The latest build of this product (v24.1.2) was released 12 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.