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

Adding an average line to an existing column chart

4 Answers 304 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 04 Nov 2013, 11:41 PM
I've got a column chart with a single series.  I am trying to add an average line to it.  So, let's say the column chart has 5 data points [10, 20, 30, 20, 30] and shows 5 columns on the chart.  The average is 22.  Do I really need to have the average data be [22, 22, 22, 22, 22], which will put a circle for each data point on the line?  Ideally, I'd like a single horizontal line across the chart without any data points showing up (while still having the data points on the columns show up so I can do hover).  Hmmm, it would be nice to still have the hoverable capability on the average line so the user can see the exact value.
What are my options here?
Thanks,
--Ed

4 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 06 Nov 2013, 07:58 AM
Hi Ed,

In order to achieve the desired result I can suggest the following two approaches:

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ian
Top achievements
Rank 1
answered on 08 Nov 2013, 02:25 PM
Iliana, both of your examples use plot bands. Can you provide an example which uses a line series as you suggested? Thanks
0
Accepted
Iliana Nikolova
Telerik team
answered on 11 Nov 2013, 09:53 AM
Hi Ian,

I apologize for the mistake - here is the jsBin with the additional line series. 

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Chuen
Top achievements
Rank 1
answered on 21 Nov 2013, 02:01 AM
I also had similar requirement before.  I can't use the line series because the line doesn't touch the y-axis, so I ended up using the plotband.  But the plotband solution is not perfect.  In most situation, I ended up with different line thickness when the scale of the data changes.
Tags
Charts
Asked by
Ed
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Ian
Top achievements
Rank 1
Chuen
Top achievements
Rank 1
Share this question
or