This is a migrated thread and some comments may be shown as answers.

Tooltip OnMouseOver Chart Series

3 Answers 134 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
chris
Top achievements
Rank 2
chris asked on 31 Jul 2008, 02:34 PM
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

3 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 01 Aug 2008, 10:13 AM
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.
0
chris
Top achievements
Rank 2
answered on 26 Aug 2008, 11:00 AM
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
0
Accepted
Giuseppe
Telerik team
answered on 27 Aug 2008, 09:36 AM
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.
Tags
Chart (Obsolete)
Asked by
chris
Top achievements
Rank 2
Answers by
Giuseppe
Telerik team
chris
Top achievements
Rank 2
Share this question
or