Templating the TrackBallInfo popup

4 posts, 0 answers
  1. Jesper
    Jesper avatar
    18 posts
    Member since:
    Jun 2012

    Posted 06 Jul 2012 Link to this post

    Hi again,

    I have now managed to get the TrackBallInfo popup window to look almost as I want it but one thing remains: I would like to have the header present the datapoint's current Category. 

    Having examined all the demos I've seen that I can in fact have the first series also present such a header for me but that won't work if the user opts that data series out of the presentation. I could have a "special" series with null values just to achieve this but that would be very a very clunky solution.

    I have also seen that I can use one of the indicators but they all seem to end up at the bottom of the info window.

    Could you please direct me to whatever documentation that explains how to template the info window while using the current datapoints?

  2. Yavor
    Yavor avatar
    401 posts

    Posted 11 Jul 2012 Link to this post

    Hello Jesper,

    You can change the display header of the trackball easily like this:

    private void ChartTrackBallBehavior_TrackInfoUpdated(object sender, TrackBallInfoEventArgs e)
        foreach (DataPointInfo info in e.Context.DataPointInfos)
            info.DisplayHeader = "Custom data point header";
        e.Header = "Sample header";

    Here is the result:

    You can find more information on styling the trackball in this topic in our online help system. 

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Peter
    Peter avatar
    28 posts
    Member since:
    Oct 2006

    Posted 15 Aug 2012 Link to this post


    I have used this technique in Q1 2012. In addition to the custom header I used a custom template for TrackBallInfoControl. In the version before I could easily display the value of header by using "{Binding Header}". Now it seems that you changed the DataContext of this template to the Context of the RadChart control. Previously it has been the current datapoint or the trackball itself. I have found no way to access the text I wrote to header. Perhaps you could tell me what I have to insert in this example:

    <Style x:Key="trackballInfoControl" TargetType="telerik:TrackBallInfoControl">
        <Setter Property="Template">
                <ControlTemplate TargetType="telerik:TrackBallInfoControl">
                        <TextBlock Text="{ ??? }" />
                        <StackPanel x:Name="panel" />

    Thanks in advance,
    Peter Schmidt
  4. Yavor
    Yavor avatar
    401 posts

    Posted 20 Aug 2012 Link to this post

    Hi Peter,

    Indeed, there is a bug in our latest binaries that prevents this approach for setting the header. I have logged this issue in our PITS system here. We will make sure that it is resolved as soon as possible, so a fix will be available in one of the upcoming LIB that is released every Monday. Also, your telerik points have been updated!

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top