Tooltip OnMouseOver Chart Series

Thread is closed for posting
4 posts, 1 answers
  1. chris
    chris avatar
    11 posts
    Member since:
    Sep 2007

    Posted 31 Jul 2008 Link to this post

    Having followed the online demo examples for showing the series value and concatonating this with text when hovering over a data point (on a line chart) I thought WOW this is great. A nice easy example to follow that works ....

    However, I have now created several of these charts all exactly the same setup but with different data sources (Quantity, Sales Volume, Value, Margin etc)

    These are all placed into sliding zones in a rad splitter. Visually this is very appealing. I have set the textbox.text to being transparent so that only the line shows over gridlines and want to show these as a toolitp. I recreated the onItemDataBound event for each graph using the event as below. But only the original chart renders the tooltip.(RadChart3)

    I have a tooltip manager on the page with autotooltipifier set to true - so picks up all controls on the page. But still no joy. Am going round in circles
    Can you help?

    Imports

    Telerik.Web.UI
    Imports System.Data
    Imports System.Data.OleDb
    Imports System.Data.SqlClient
    Imports System.Configuration
    Imports Telerik.Charting.ChartItemDataBoundEventArgs

    .................
    .................
    Protected
    Sub RadChart1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Charting.ChartItemDataBoundEventArgs) Handles RadChart1.ItemDataBound

    e.SeriesItem.ActiveRegion.Tooltip = (

    DirectCast(e.DataItem, DataRowView))("FNInvOrderDate").ToString() & ": Sales Qty: " & e.SeriesItem.YValue

    End Sub

    Protected Sub RadChart2_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Charting.ChartItemDataBoundEventArgs) Handles RadChart2.ItemDataBound

    e.SeriesItem.ActiveRegion.Tooltip += (

    DirectCast(e.DataItem, DataRowView))("FNInvOrderDate").ToString() & ": Sales Vol sq.ft: " & e.SeriesItem.YValue

    End Sub

    Protected Sub RadChart3_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Charting.ChartItemDataBoundEventArgs) Handles RadChart3.ItemDataBound

    e.SeriesItem.ActiveRegion.Tooltip += (

    DirectCast(e.DataItem, DataRowView))("FNInvOrderDate").ToString() & ": Sales £'s: " & e.SeriesItem.YValue

    End Sub

    Protected Sub RadChart4_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Charting.ChartItemDataBoundEventArgs) Handles RadChart4.ItemDataBound

    e.SeriesItem.ActiveRegion.Tooltip += (

    DirectCast(e.DataItem, DataRowView))("FNInvOrderDate").ToString() & ": C.O.S. £'s: " & e.SeriesItem.YValue

    End Sub

    Protected Sub RadChart5_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Charting.ChartItemDataBoundEventArgs) Handles RadChart5.ItemDataBound

    e.SeriesItem.ActiveRegion.Tooltip += (

    DirectCast(e.DataItem, DataRowView))("FNInvOrderDate").ToString() & ": Profit £'s: " & e.SeriesItem.YValue End Sub

    Protected Sub RadChart6_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Charting.ChartItemDataBoundEventArgs) Handles RadChart6.ItemDataBound

    e.SeriesItem.ActiveRegion.Tooltip += (

    DirectCast(e.DataItem, DataRowView))("FNInvOrderDate").ToString() & ": % Margin: " & e.SeriesItem.YValue

    End Sub

  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 01 Aug 2008 Link to this post

    Hi chris,

    We are unable to reproduce the problematic behavior in our local tests. Please review the attached sample application that follows your guidelines and let us know if we are missing something out.


    Best wishes,
    Manuel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. chris
    chris avatar
    11 posts
    Member since:
    Sep 2007

    Posted 26 Aug 2008 Link to this post

    Hi Manuel

    Thanks for looking at this for me - I have been away for sometime but just got back and have figured it out. I took the long winded route by examining the chart setups for the one that worked and one of those which didn't.

    Bit of a novice error I.m afraid. I hadn't set the Point Marks to be visible. Whilst you don't need to set the colour or border setings the visibility must be set to true to capture the "on item data bound".

    Maybe this could be added to the on line examples as a note of reference.

    Thanks Again
    Chris
  4. Answer
    Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 27 Aug 2008 Link to this post

    Hi chris,

    We are glad that everything works as expected now. We will take your feedback into consideration add the relevant information to the online examples as well.


    Best wishes,
    Manuel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top