DataLabelsColumn Custom Format

Thread is closed for posting
5 posts, 1 answers
  1. Mahmoud
    Mahmoud avatar
    25 posts
    Member since:
    Sep 2012

    Posted 01 Feb 2012 Link to this post

    Hi,

    I have a simple RadChart in my application , but I have a little issue which is:

    I have DataLabelsColumn as Number Rtrieved from Database & I don't know how to set a Custom Format to it Like

    Percent Format and how to put an Appearance also . 
     
    Please can anybody help me with this ...

    Regarding,
    Mahmoud
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 03 Feb 2012 Link to this post

    Hi,

    To see more information along the lines of the formatting issue, please refer to the following article:

    http://www.telerik.com/help/aspnet-ajax/radchart-axis-labels.html

    Additionally, another option is to access the textblocks along the axis, and set the text directly, if none of the format strings are applicable.
    I hope these options are applicable for you.

    Regards,
    Yavor
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mahmoud
    Mahmoud avatar
    25 posts
    Member since:
    Sep 2012

    Posted 05 Feb 2012 Link to this post

    Thanks Yavor,

    I figured out what I really want is Series Item Labels 

    Can you tell me how to put a format for it ????
    I can put appearance for it very easily But I can't see anyway to put a custom format for it.

    I'm really stuck here,
    Can you help me with this problem .

    Best Regards,
    Mahmoud
  5. Mahmoud
    Mahmoud avatar
    25 posts
    Member since:
    Sep 2012

    Posted 06 Feb 2012 Link to this post

    Hi,

    I was able to do this finally programmatically from code-behing 

    Using FormatCurrency Function

    RadChart1.Chart.Series(0).Items(item).Label.TextBlock.Text = FormatCurrency(DirectCast(chartDS.Tables(0).Rows(item).Item("Profit"), Integer), 0, TriState.False, TriState.False,).ToString()


    Thanks

    Best Regarding,
    Mahmoud
  6. Answer
    Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 08 Feb 2012 Link to this post

    Hi Mahmoud,

    We are glad that you figured this out on your own. Aside from your solution here's how you can do this - for formatting purposes RadChart exposes the DefaultLabelValue property. You can read more about it in our help topic.

    Greetings,
    Evgenia
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017