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

Change the color of the bars in the bar chart

5 Answers 1899 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 30 Oct 2012, 09:33 PM
I have one series.  I need different colors.  I am not using a legend where this would be a problem.  Is this possible?

[EDIT]
Before someone asks why, it's because the series is a metric that has a goal (e.g. total sales).  The bars are monthly.  So the chart might be titled "total sales" and the bars are for "Jan", "Feb", "Mar", etc.  Each bar is supposed to be red if far below goal, yellow when near the goal, and green when at or past the goal.  

5 Answers, 1 is accepted

Sort by
0
Accepted
Hristo Germanov
Telerik team
answered on 31 Oct 2012, 07:23 AM
Hello Paul,

Could you please examine this online demo and tell me if any questions?

Greetings,
Hristo Germanov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gary
Top achievements
Rank 1
answered on 18 Dec 2012, 06:50 PM
Is there way to change the color of a single bar from the seriesClick event? 

I'm using the "e.category" to populate a grid with additional details and would like visual feedback to the user on what what was selected within the chart.
0
Hristo Germanov
Telerik team
answered on 19 Dec 2012, 11:25 AM
Hello Gary,

In order to achieve your goal you need to set the color to the dataitem and then you can update the chart datasource.

For your convenience you have examine this jsbin which implements the suggested approach.

Regards,
Hristo Germanov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Andrew
Top achievements
Rank 1
answered on 07 Apr 2015, 09:59 PM

Please see this JSFiddle where I have used your example to change the bar color.  However, the series color is wrong. Please advise?

 

http://jsfiddle.net/1ycxL3fo/

0
Iliana Dyankova
Telerik team
answered on 10 Apr 2015, 07:54 AM
Hi Andrew,

Please take a look at this forum thread which discussed the same topic.

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Paul
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Gary
Top achievements
Rank 1
Andrew
Top achievements
Rank 1
Iliana Dyankova
Telerik team
Share this question
or