How to add an average line to a bar chart

3 posts, 0 answers
  1. sohee
    sohee avatar
    7 posts
    Member since:
    Feb 2020

    Posted 06 Feb Link to this post

    Hi

     

    I want to show the average line for each group on the bar chart.

     

    For example, I want to display like an attached file.

     

    I am developing using VUE.js. please answer about my question.

  2. Martin
    Admin
    Martin avatar
    198 posts

    Posted 10 Feb Link to this post

    Hello Sohee,

    Thank you for the screenshot.

    The desired functionality is not provided out-of-the-box. On this thread you will find information about two possible approaches using plotbands or using a new line series. You will also find example demonstrating each of them.

    A third option would be to use the rangeColumn Chart. You will see that the data configuration is an array of arrays. You can pass values with very small difference (e.g [5, 5.1]) so that the rangeColumn would look like a line. However, this solution would require you to calculate the offsets manually by first getting the values for the data configuration from the DataSource. If you settle for this approach, I would recommend a careful testing to avoid any undesired results.

     I hope I was helpful. Let me know if you have any further questions.

    Regards,
    Martin
    Progress Telerik

    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 Feedback Portal and vote to affect the priority of the items
  3. sohee
    sohee avatar
    7 posts
    Member since:
    Feb 2020

    Posted 17 Feb Link to this post

    The third option(Using the rangeColumn Chart) is most similar to what I want.

    Thank you for the solutions.

Back to Top