Tooltip - Include both X and Y Axis Values?

4 posts, 0 answers
  1. Randy Minder
    Randy Minder avatar
    20 posts
    Member since:
    Aug 2009

    Posted 21 Dec 2011 Link to this post

    We're evaluating RadChart 2011-Q3. We like the tooltip concept, but it would be much more useful to us if we could somehow get both the Y axis and X axis value to display to the user. I can't seem to find a way to do this. Is it possible?

    Thank you.
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    1010 posts

    Posted 22 Dec 2011 Link to this post

    Hello,

    Yes, this can easily be achieved by setting the ItemToolTipFormat property of the series. I have pasted some code below.
    <telerik:RadChart>
     <telerik:RadChart.SeriesMappings>
      <telerik:SeriesMapping>
       <telerik:SeriesMapping.SeriesDefinition>
        <telerik:BarSeriesDefinition ItemToolTipFormat="the X value is #X, the Y value is #Y" ShowItemToolTips="True" />
        </telerik:SeriesMapping.SeriesDefinition>
       <telerik:ItemMapping DataPointMember="XValue" FieldName="Day" />
       <telerik:ItemMapping DataPointMember="YValue" FieldName="Degrees" />
       </telerik:SeriesMapping>
     </telerik:RadChart.SeriesMappings>
    </telerik:RadChart>

    You can read about other format expressions here. Note that it is also possible to access your business object's properties through the #DATAITEM token.

    This section on ToolTips might also be interesting to you as it demonstrates how to format the tooltip and how to set a custom tooltip content. You can also find an example of setting a custom tooltip content in our demos (the demo is called Custom Tooltips).

    Hope the above information and links help.

    Greetings,
    Petar Marchev
    the Telerik team

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

  3. Purna
    Purna avatar
    10 posts
    Member since:
    Nov 2017

    Posted 20 Nov 2017 in reply to Petar Marchev Link to this post

    How to have the same thing in radcartesianChart?

    Telerik.Windows.Controls.ChartView.BarSeries doesnot have the property ItemToolTipFormat

     

  4. Martin Ivanov
    Admin
    Martin Ivanov avatar
    1593 posts

    Posted 22 Nov 2017 Link to this post

    Hello Purna,

    I answered your question in the other forum. Can you please check it there?

    Regards,
    Martin Ivanov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top