Apply theme to dataviz components with Angular

4 posts, 1 answers
  1. Casper
    Casper avatar
    17 posts
    Member since:
    Sep 2014

    Posted 26 Sep 2014 Link to this post

    We would like to apply our own theme to some of the dataviz controls, ScatterChart etc.
    We are using AngularJS and I am not able to figure out how to apply my custom theme without resorting to jQuery.

    I am also unable to figure out how to set a gradient background to the charts, is this possible?

    Thanks
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 29 Sep 2014 Link to this post

    Hi Casper,

    Up to the requirements
    - Apply custom theme
    In order to create custom theme you can use the ThemeBuilder tool. Hence use "newTheme" in the chart theme configuration. For your convenience here is a dojo example which demonstrates the expected outcome;
    -  Set gradient background
    Currently you can control only the built-in chart gradients (documentation link).

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Casper
    Casper avatar
    17 posts
    Member since:
    Sep 2014

    Posted 02 Oct 2014 in reply to Iliana Nikolova Link to this post

    Thanks Iliana,
    What I am looking for is actually a more "Angular way" of registering the theme. Right now I have the theme in a separate js file which calls the global scope variable kendo to register the theme. Then in my controller I attache the theme like this:
    $scope.options = {
        theme: "newTheme"
    }
    and while this works I don't particularly like that I have to call kendo.dataviz.ui.registerTheme.

    With regards to the gradient background I would like to apply a gradient to the canvas background not the individual chart items, this I can't find in the documentation.

    Thank you,
    Casper
  4. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 06 Oct 2014 Link to this post

    Hi Casper,

    I am not quite sure what do you mean with more "Angular way" for registering the theme - could you please elaborate a bit more and / or provide an example? Thank you in advance.

    Regarding a gradient to the background - this requirement is currently not supported by Kendo UI Chart. As a possible workaround I would suggest to use a background image (like in this example).

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top