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

Column Charting Legend

6 Answers 62 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Linden
Top achievements
Rank 1
Linden asked on 24 Mar 2016, 05:19 PM

The legend colors are not matching the colors I have set for the individual series in my bar chart. I have read through several different forum topics that were supposed to have a  solution, but none of them seem to work. I am using hexadecimal web colors and assigning them to Series.Color as specified in "http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart#configuration-series.color".   How can I CUSTOMIZE or SET the legend colors as well?  I have read the following forum topics, but neither solve the problem. 

 

http://www.telerik.com/forums/legend-color-change#Feo0EzBZ6E6jA3Ns-3WOjQ

http://www.telerik.com/forums/stack-bar-chart#HvKBqPuqP023kBLIQHAnrA

6 Answers, 1 is accepted

Sort by
0
EZ
Top achievements
Rank 2
answered on 24 Mar 2016, 11:06 PM

This DOJO shows the correct color legend:

http://dojo.telerik.com/@ezanker/ITOdO

Can you edit it to reproduce your issue?

0
Linden
Top achievements
Rank 1
answered on 25 Mar 2016, 01:44 PM
I see what the issue is now.  I need to upgrade the version I am working with. Only after I switched to the 2014 version, was  I able to reproduce the issue. I just have to upgrade and all should work fine. 
0
Linden
Top achievements
Rank 1
answered on 28 Mar 2016, 01:27 PM

Upon updating to the latest version, I am still having issue getting the legend to display the same colors as the columns in the charts. Has anyone else reported having similar issues?

 

0
Daniel
Telerik team
answered on 29 Mar 2016, 05:18 AM
Hi,

There are not any known reasons for the series color option not to be applied to the legend. The problem could occur if you are using the colorField option which will set the color for individual points but not for the series. If that is the case and the color field for all points in the same series is the same then you can use the dataBound event to set the series color - example. If this is not scenario then please provide a runnable sample that replicates the problem or at least the code that you are using so I can try to replicate it on my side.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Linden
Top achievements
Rank 1
answered on 29 Mar 2016, 01:25 PM
Thank you very much for your assistance. I will keep this method in mind when I need to dynamically assign colors to the chart. For the time being I was able to work around it by using seriesColors which seemed to work for what I was trying to do. You may close this ticket. 
0
Daniel
Telerik team
answered on 31 Mar 2016, 07:23 AM
Hi again,

OK, I am closing the ticket but if you have the time could provide a repro sample that demonstrates the issue? It might be a bug that requires fixing.

Regards,
Daniel
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
Linden
Top achievements
Rank 1
Answers by
EZ
Top achievements
Rank 2
Linden
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or