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

Radchartview line series

3 Answers 201 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Erkin
Top achievements
Rank 1
Erkin asked on 16 Dec 2016, 07:13 PM

Hi,

I was wondering if there is a way to use tooltips on a line series instead of a trackball. For example if i clicked on a certain line series in a multiline series chart, the information for that point of the line series would be displayed to the user? 

Thank you.

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 19 Dec 2016, 08:55 AM
Hi Erkin,

Thank you for writing.

The following article shows how you can show tooltips: Tooltip | ChartView. When using line series, you will need to make the data points a bit bigger show the user can easily hover them: 
radChartView1.ShowToolTip = true;
 
LineSeries lineSeries = new LineSeries();
lineSeries.PointSize = new SizeF(15, 15);

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Erkin
Top achievements
Rank 1
answered on 21 Dec 2016, 03:37 PM

Dimitar,

 

Thank you very much for that information that helped out a lot. I do have another question that maybe you can answer.

I want to use the tooltip as a custom tooltip that displays some more information about the current point the user is pointing at. 

currently I have the example code given in the tooltips api for custom tool tips.

 

This is the current controller method I am using. 

 

        private void tooltipController_DataPointTooltipTextNeeded(object sender, DataPointTooltipTextNeededEventArgs e)
        {
            e.Text = "Voltage:\nCurrent:\nTemperature:";
        }

 

Basically I want to take the data from that current point that is showing the tooltip (X,Y info etc.) and display it for the user.

Any ideas?

 

Thank you.

 

Erkin

0
Dimitar
Telerik team
answered on 22 Dec 2016, 09:12 AM
Hi Erkin,

You just need to cast the point to the appropriate type. For example:
private void Controler_DataPointTooltipTextNeeded(object sender, DataPointTooltipTextNeededEventArgs e)
{
   var point = e.DataPoint as CategoricalDataPoint;
 
    e.Text = string.Format("Category:{0} Value:{1}", point.Category, point.Value);
}

Please do not hesitate to contact us with any additional questions or concerns. 

Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Erkin
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Erkin
Top achievements
Rank 1
Share this question
or