Chart tooltip

Thread is closed for posting
3 posts, 0 answers
  1. Tyler
    Tyler avatar
    2 posts
    Member since:
    Feb 2012

    Posted 03 Mar 2012 Link to this post

    Please bear with me as I am new to programming –

    I am having a difficult time with getting additional information into the chart tooltip. I am pulling data from isostore:/data.sdf to populate the graph (that part is fine) however what I am trying to do is add additional data from the data.sdf context into the tooltip that is not in the mySeries.ValueBinding & mySeries.CategoryBinding. I want to add property ‘Note’ and ‘DataPoint2’ to the tooltip.  

    Here is the c#

     mySeries.CategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "DateCreated" };

     mySeries.ValueBinding = new PropertyNameDataPointBinding() { PropertyName = "DataPoint1" };

     Here is the xaml

     <chart:BarSeries ShowLabels="True" CombineMode="Stack" ValueBinding="DataPoint1" ItemsSource="{Binding}">



     <Rectangle Fill="{StaticResource PhoneForegroundBrush}" />



     </chart:BarSeries >

  2. Victor
    Victor avatar
    1358 posts

    Posted 07 Mar 2012 Link to this post

    Hi Tyler,

    Thank you for writing.
    Are you familiar with the tooltip help article? It contains a great example of how to create a custom object that is used as the tooltip data context. Basically you can put any information that you deem appropriate.

    Please write again if you need further assistance.

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Tyler
    Tyler avatar
    2 posts
    Member since:
    Feb 2012

    Posted 07 Mar 2012 Link to this post

    Thank you for the replay – yes I have seen and was able to reproduce the example. But I was missing something when I try to get it to work the DataPoints index. I was able to make it work with a little help from a friend.

     CategoricalDataPoint pData = series.DataPoints[pointIndex];

     var data = from c in dbBP.Itmes where c.Id == (int)pData.Category select c;

Back to Top