This is a migrated thread and some comments may be shown as answers.
Changing theme on Gauge (radial ou linear)
2 Answers 81 Views
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 1
Pierre asked on 20 Sep 2013, 06:58 PM
I try to change the theme dynamically.

I change the kendo.dataviz.(theme).min.css in the page
then I call this
var kendoElem = $elem.data('kendoRadialGauge');
kendoElem.setOptions({ theme: 'moonlight'});
kendoElem.redraw();

The gauge redraw  but the color of the pin and text graduation do not change.

Any suggestion?

2 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 23 Sep 2013, 08:38 AM
Hello Pierre-D.,

Basically all configuration options of Kendo UI Gauge are stored in the _originalOptions. You can change the theme from here (take a look at the code snippet below), however keep in mind this variable is intended for internal usage:
//get reference to the Gauge widget
var gauge = $("#gauge").data("kendoRadialGauge");
//get the options
var options = gauge._originalOptions;
//set the new theme
options.theme = "moonlight"
//destroy the Gauge
gauge.destroy();
//recreate the gauge with the new theme
$("#gauge").kendoRadialGauge(options);

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
Pierre
Top achievements
Rank 1
answered on 25 Sep 2013, 04:51 PM
thanks for your help. All is working now.
Asked by
Pierre
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Pierre
Top achievements
Rank 1
Share this question
or