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

How to set alternate background color for chart?

3 Answers 1406 Views
Charts
This is a migrated thread and some comments may be shown as answers.
ye
Top achievements
Rank 1
ye asked on 13 Jul 2015, 07:27 AM

The kendoChart  background color use  white for default. How i can set alternate color for background?  

 Like the attack effects.

 

 

3 Answers, 1 is accepted

Sort by
0
Plamen Lazarov
Telerik team
answered on 15 Jul 2015, 07:14 AM

Hello,

Basically you can set a different background color to the plotArea by plotArea.background option. However in order to set background similar to the attached image you can use valueAxis.plotBands.

Please refer to the example below. 
http://dojo.telerik.com/AjoqO

Regards,
Plamen Lazarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Sean
Top achievements
Rank 1
answered on 27 Oct 2016, 09:23 PM
how would you do this when you don't know all your data values?  Where the value axis changes depending on a max value?  It could be 20 or 1000 depending on the data set.
0
Daniel
Telerik team
answered on 31 Oct 2016, 09:57 AM
Hello,

If the value range is not known in advance then I can suggest to use the approach demonstrated in this example to draw the plotbands via the Drawing API in the render event - example.

Regards,
Daniel
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
Tags
Charts
Asked by
ye
Top achievements
Rank 1
Answers by
Plamen Lazarov
Telerik team
Sean
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or