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

bar chart + rgba color problem

4 Answers 274 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Bela
Top achievements
Rank 1
Bela asked on 18 Sep 2012, 03:48 PM
Hello guys,

I have a problem with series border color when series color is defined as RGBA color.
In general border color is matching with series color. However if you use RGBA colors the border will be black no matter what color you used.

Repro:
http://jsfiddle.net/3v24W/1/

Any opinion?

Cheers,
ilo

4 Answers, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 19 Sep 2012, 07:31 AM
Hi Bela,

The bars' border color is based on the series' color but slightly darker. Obviously we have a problem calculation this color. Could you please try to set border color manually: http://jsfiddle.net/3v24W/4/

Kind 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
Bela
Top achievements
Rank 1
answered on 19 Sep 2012, 07:48 PM
Hi Hristo,

Thank you for your answer. Setting border color works well in this simplified example, but I'm dealing with a chart with custom bar colors. In that case setting border color manually is not an option since there is no way to set this property separately on each bar.

Do you know about any workaround for that case?

As a temporary solution I removed the border (border.width: 0) so the black border doesn't break the design.

Best regards,
ilo
0
Hristo Germanov
Telerik team
answered on 21 Sep 2012, 07:46 AM
Hello Bela,

Chart does not support RGBA color because it is not supported by all browsers(for example IE does not support RGBA). Can you try to set chart's seriesColors with RGB/HEX?

Kind 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
Bela
Top achievements
Rank 1
answered on 26 Sep 2012, 05:27 PM

Hello Hristo,

Thank you for your answer.

I have no problem with the fact that Kendo charts with RGBA colors are wrongly displayed in browsers where RGBA is not supported however I would expect them to be displayed correctly in modern browsers (just like rounded corners), since I haven’t found anything in the documentation that suggests I shouldn’t use them.

“Any valid CSS color string will work here, including hex and rgb.” – about using colors in Kendo DataViz.

So I still think this is a bug, or the documentation is not accurate enough.

Anyways, this is not a problem for me anymore, since I’m satisfied with the charts’ appearance without borders, and I’m using different color schema depending on the browser’s type – RGBA colors in modern browsers and RGB/HEX colors in old browsers.

Kind regards,
ilo

P.S. I have to use RGBA colors to make one bar highlighted (by fading the other bars’ color) in the bar chart. If you know any other way to reach the same effect without using RGBA colors (e.g. using series opacity in some way), please let me know.

Tags
Charts
Asked by
Bela
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Bela
Top achievements
Rank 1
Share this question
or