ToolTip formatting

4 posts, 0 answers
  1. jdgoulden
    jdgoulden avatar
    20 posts
    Member since:
    Nov 2006

    Posted 25 May 2009 Link to this post

    I am using a Chart to display values on the Y axis with the XAxis representing time. Everything works fine using the DateTime.GetOATime() and times appear on the X axis fine, but when I try to get the X value to appear in the tooltip I get a value like
    39850.666667. I'm wondering how I can modify the Format string to display a DateTime value. The code I am using with now is


    DataSeries lineSeries = new DataSeries() { LegendLabel = data.SeriesData[i].Label };


    lineSeries.Definition =

    new LineSeriesDefinition();


    lineSeries.Definition.ToolTipFormat =

    "Time: #X\nValue: #Y";


    lineSeries.Definition.ShowItemLabels =



    lineSeries.Definition.ShowItemToolTips =





    I have tried to modify the ToolTipFormat string several different ways, but can't figure out a way to make this work.

    Any help would be appreciated.

  2. Vladimir Milev
    Vladimir Milev avatar
    1061 posts

    Posted 27 May 2009 Link to this post

    Hi jdgoulden,

    Thanks for writing. I have looked over your case and unfortunately we have to admit you have found a bug in RadChart. If you have set the IsDateTime property of your DataPoints to true then the tooltips should indeed be formatted as dates. However, due to a bug in the control if you are using custom RadChart label format expressions as the tooltip format string the values will be displayed as numbers. I have already fixed this problem, but it is too late for the Service Pack 2 release now. You can expect this problem to be resolved with the next internal build. 

    Your telerik points have been updated for reporting this issue.

    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  3. Daniel Aquere
    Daniel Aquere avatar
    87 posts
    Member since:
    Mar 2011

    Posted 23 Apr 2011 Link to this post

    Hello Everyone,

    Please, I need to format my tooltips with currency format ("#Y{C}"), but, I don´t know where put the configuration. Actually appears 123456, I´d like 1.234,56.

    i apreciate any help.

    Thanks, best

  4. Evgenia
    Evgenia avatar
    1437 posts

    Posted 27 Apr 2011 Link to this post

    Hi Daniel,

    RadChart allows you to specify how to format the labels by the ChartArea.LabelFormatBehavior property as described in our help topic. By default it is set to HumanReadable. If you set it to None the numbers will be shown according to your Culture (with two or more delimiters):

    RadChart1.DefaultView.ChartArea.LabelFormatBehavior = LabelFormatBehavior.None;
    NOTE that changing the LabelsFormatBehavior will affect the whole ChartArea (the Axes, the Series, theToltips and etc.)

    I hope this helps.

    Best wishes,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top