How to set alternate background color for chart?

4 posts, 0 answers
  1. ye
    ye avatar
    10 posts
    Member since:
    Aug 2014

    Posted 13 Jul 2015 Link to this post

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

     Like the attack effects.

     

     

  2. Plamen Lazarov
    Admin
    Plamen Lazarov avatar
    135 posts

    Posted 15 Jul 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Sean
    Sean avatar
    2 posts
    Member since:
    Dec 2015

    Posted 27 Oct in reply to Plamen Lazarov Link to this post

    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.
  5. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 31 Oct Link to this post

    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.
     
Back to Top
Kendo UI is VS 2017 Ready