This is a migrated thread and some comments may be shown as answers.

How to add an average line to a bar chart

2 Answers 382 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sohee
Top achievements
Rank 1
Iron
sohee asked on 06 Feb 2020, 08:45 AM

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 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 10 Feb 2020, 11:05 AM

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
0
sohee
Top achievements
Rank 1
Iron
answered on 18 Feb 2020, 05:09 AM

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

Thank you for the solutions.

Tags
General Discussions
Asked by
sohee
Top achievements
Rank 1
Iron
Answers by
Martin
Telerik team
sohee
Top achievements
Rank 1
Iron
Share this question
or