Tooltip - Include both X and Y Axis Values?

2 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
    Petar Marchev avatar
    996 posts

    Posted 22 Dec 2011 Link to this post


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

    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.

    Petar Marchev
    the Telerik team

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

Back to Top