Dynamic Series Labels

4 posts, 1 answers
  1. David
    David avatar
    25 posts
    Member since:
    Jan 2017

    Posted 16 Apr 2019 Link to this post


    I have a stacked bar chart that I want to have the series labels to be dynamically created on the last "color"

    Currently in the attached file, i attached the series label to my "blue" bar.  However once inside the callback I can't get to my component to generate a dynamic label.

    If i have just 2 colors, i can calculate the label using "value" and "stackedValue" ... but with more than 2 i need to get at my component

    So how can I get the label to show total for each color in the row, not just the last color, ie

    1st row is 1/4/7
    2nd row is 2/5/8
    3rd row is 3/6/9

    Here is my sample



  2. David
    David avatar
    25 posts
    Member since:
    Jan 2017

    Posted 17 Apr 2019 in reply to David Link to this post

    I was able to customize my label using the content method of the  SeriesLabelsComponentGenerated class ...

    It allows the method to get the context of "this" so I can generate my custom string 

  3. Answer
    Dimiter Topalov
    Dimiter Topalov avatar
    1263 posts

    Posted 18 Apr 2019 Link to this post

    Hi David,

    This indeed the most straight-forward approach to achieve the desired functionality:


    The alternative is to create a custom visual that gives the developer full control over drawing the respective label element:


    Dimiter Topalov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. David
    David avatar
    25 posts
    Member since:
    Jan 2017

    Posted 18 Apr 2019 in reply to Dimiter Topalov Link to this post

    Thank you very much Dimiter !!
Back to Top