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

Apply theme to dataviz components with Angular

3 Answers 98 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Casper
Top achievements
Rank 1
Casper asked on 26 Sep 2014, 07:17 AM
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

3 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 29 Sep 2014, 08:50 AM
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!
 
0
Casper
Top achievements
Rank 1
answered on 02 Oct 2014, 08:32 AM
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
0
Accepted
Iliana Dyankova
Telerik team
answered on 06 Oct 2014, 07:25 AM
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!
 
Tags
General Discussions
Asked by
Casper
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Casper
Top achievements
Rank 1
Share this question
or