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

RadChart-Tool Tip

1 Answer 143 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Preetam Ray
Top achievements
Rank 1
Preetam Ray asked on 10 Nov 2008, 12:33 PM
    We are using rad-chart for our application and the chart that gets generated is dynamically generated one where in i am trying to add  tool tip for the  series item by concatneating two string values .The issue is that when i try to add a Newline definition between them i get JS error when the page loads saying "String has not been terminated".But the two string values appears one below the other as expected.PFB the code  that generates the above issue.


(int ic = 0; ic < dtv.Count; ic++)



ChartSeriesItem seriesItem =

new ChartSeriesItem();


seriesItem.YValue = (



seriesItem.Name = "Settlement";

seriesItem.Appearance.Border.Color = Color.Black;

seriesItem.XValue = Convert.ToDouble(dtv[ic]["Date"]);

seriesItem.ActiveRegion.Tooltip = "Date :" + DateTime.FromOADate(Convert.ToDouble(dtv[ic]["Date"])).ToShortDateString() + "" + System.Environment.NewLine + "Price :$" + dtv[ic]["Settlement"].ToString() + "";



null, seriesItem.ActiveRegion.Tooltip.ToString(), true);



The code has been highligted in green color.

Please let me know where i am wrong.

Thanks & Regards,

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 12 Nov 2008, 12:27 PM
Hi Preetam Ray,

Generally if you are integrating RadChart and RadTooltipManager it is not possible to use the RadTooltipManager.TargetControls collection. The supported options are:

  • Either use RadTooltipManager.AutoTooltipify property set to true.
  • Or set RadToolTipManager.ToolTipZoneID to the ClientID of the chart control (in order to only use RadToolTipManager for the chart) as demonstrated here.

However, you will not be able to insert new line in the displayed tooltip like this -- you can only customize the RadToolTipManager.Width property that would restrict the width for all tooltips. Note that the result you are observing on your end currently after the JavaScript error occurs is a system tooltip and not RadTooltip -- if you would like to use multiline tooltip in this scenario you would need to use system tooltips instead.

Sorry for the inconvenience.

Kind regards,
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Chart (Obsolete)
Asked by
Preetam Ray
Top achievements
Rank 1
Answers by
Telerik team
Share this question