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

Customize RadChartView Trackball DisplayContent

Environment

Product Version 2019.2.618
Product RadChartView for WPF

Description

How to modify the display content of ChartTrackBallBehavior's TrackBallInfoControl in RadChartView.

Solution

Set the DataPointInfoTemplate property of TrackBallInfoControl. To do this, use the TrackBallInfoStyle property of RadCartesianChart.

<telerik:RadCartesianChart.TrackBallInfoStyle> 
    <Style TargetType="telerik:TrackBallInfoControl"> 
        <Setter Property="DataPointInfoTemplate"> 
            <Setter.Value> 
                <DataTemplate> 
                    <TextBlock Text="{Binding DisplayContent}" Foreground="Green" FontStyle="Italic"/> 
                </DataTemplate> 
            </Setter.Value> 
        </Setter> 
    </Style> 
</telerik:RadCartesianChart.TrackBallInfoStyle> 
WPF RadChartView Customize Trackball DisplayContent
In this article