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

Tool tip Pop up on Mouse over on a Chart

3 Answers 201 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
kiran
Top achievements
Rank 1
kiran asked on 05 Jun 2008, 01:16 PM
Hi,

I need to show a tool tip pop up on mouse over on a chart.

exact requirement is like:

i have a Line chart with dates on X-axis and double values on Y-axis.

In general on mouse over on any chart we will get tool tip which shows the value at that point.

instead i need to show a pop up  kind of thing (like wise context menu/ Data table which has one column and multiple rows) on mouse over.which should  have 5 different data items which i need to get from XML/DataBase for that particular date where Mouse was currently placed.

Can any one provide the approach to do this? is this possible with RadControls?
If so please provide some sample application/ Code.

Thanks in advance.

regards,
kiran

3 Answers, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 06 Jun 2008, 06:25 AM
Hello kiran,

The following code demonstrates setting tooltip to the second Item of the first series:
this.radChart1.Series[0].Items[1].ActiveRegion.Tooltip = "This is the second item in the first series."
 

Should you have further questions, do not hesitate to write us.




Kind regards,
Evtim
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
kiran
Top achievements
Rank 1
answered on 26 Jun 2008, 12:25 PM
Hi Evtim,

The tool tip is not working for line chart. this is a major mishap for me . The following code i have used to show tool tip.
i have drawn a line chart with datatable data binding. after that i added the following code:

ChartSeriesItemsCollection items = this.radChart1.Series[1].Items;
for (int i = 0; i < items.Count; i++)
{
    items[i].ActiveRegion.Tooltip = items[i].YValue.ToString();
}

what is the problem in this code.
 
I am in a big trouble now. Please help me out to get rid of this. Any help is highly appreciated.

Please share some sample code or sample application if there is any way to resolve this.

Regards,
Kiran
0
Dwight
Telerik team
answered on 30 Jun 2008, 06:36 AM
Hello kiran,

Your code works fine, but you need to enable point marks for the line series:
this.radChart1.Series[0].Appearance.PointMark.Visible = true
this.radChart1.Series[0].Appearance.PointMark.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid; 
this.radChart1.Series[0].Appearance.PointMark.FillStyle.MainColor = Color.Red; 
 

Hope that helps.

All the best,
Evtim
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (obsolete as of Q1 2013)
Asked by
kiran
Top achievements
Rank 1
Answers by
Dwight
Telerik team
kiran
Top achievements
Rank 1
Share this question
or