itemtooltipformat show .mil instead of 1.000.000

4 posts, 0 answers
  1. Jonam
    Jonam avatar
    36 posts
    Member since:
    Jul 2010

    Posted 24 Jan 2011 Link to this post

    I have two charts. Both of them i set the tooltip.

    sm5.SeriesDefinition.ItemToolTipFormat = "mytext:" +

     

    ": #Y";

    in one chart i see the amount like 1.2 mil. and the other displays 1.200.000. How do i control this behaviour with the formats?

    kind regards,

    Jonam

     

  2. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 26 Jan 2011 Link to this post

    Hello Jonam,

    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.)

    All the best,
    Evgenia
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. Jonam
    Jonam avatar
    36 posts
    Member since:
    Jul 2010

    Posted 26 Jan 2011 Link to this post

    Hello,

    i set the property fo humanReadable. As you can see the axis show the human readable format but the tooltip still gives a regular number. Any other settings that i am missing?
  4. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 31 Jan 2011 Link to this post

    Hello Jonam,

    You can follow our help topic and set Custom Format Strings for the ItemTooltips.
    For example you can use this format string to represent the Tooltips in Human Readable format:
    seriesMapping.SeriesDefinition.ItemToolTipFormat = "#DATAITEM.Value1{0,, mil}";
    Each "," delimiter divides the value by 1000 and the "mil" string is appended to the format.

    To represent the values in this format (for example: 1,234,567) you can use this format string:
    seriesMapping.SeriesDefinition.ItemToolTipFormat = "#DATAITEM.Value1{#,###,##0}";

    All the best,
    Evgenia
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top