how to control data unit of radchart

3 posts, 1 answers
  1. B
    B avatar
    2 posts
    Member since:
    Sep 2012

    Posted 17 Sep 2012 Link to this post

    i use barchart in my project and bind it to data source

    then the chart display data in K(kilo) and other units

    how can i control or disable this behavior

    thanks
  2. Answer
    Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 20 Sep 2012 Link to this post

    If you are talking about the human readable formatting (k, mil, bil, tri) then you can simply disable it by setting the LabelFormatBehavior property of the ChartArea to None:
    this.radChart1.DefaultView.ChartArea.LabelFormatBehavior = LabelFormatBehavior.None;

    To control the axis-labels formatting you can use the DefaultLabelFormat property of the axis:
    this.radChart1.DefaultView.ChartArea.AxisY.DefaultLabelFormat = "#VAL"; // "#VAL{#,, millions}";

    To control the item-labels formatting you need to use the ItemLabelFormat of the series definition:
    this.radChart1.SeriesMappings[0].SeriesDefinition.ItemLabelFormat = "#Y{C2}";

    References:
    Format Expressions

    Kind regards,
    Petar Marchev
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. UI for WPF is Visual Studio 2017 Ready
  4. B
    B avatar
    2 posts
    Member since:
    Sep 2012

    Posted 20 Sep 2012 Link to this post

    thanks for help
Back to Top