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

Can't set value of RadialGauge in TypeScript project

4 Answers 48 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Gustavo
Top achievements
Rank 1
Gustavo asked on 30 Jun 2015, 04:41 PM

I'm facing a problem when I try to change the Radial Gauge value with the code below in my TypeScript project.

var gauge = $("#gauge").data("kendoRadialGauge");
gauge.options.pointer[0].value = Math.random() * 100;

 

The property 'value' is updated with the new value, but the pointer doesn't move.

What I'm doing wrong?

 

Thanks!

4 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 03 Jul 2015, 08:01 AM

Hello Gustavo,

The options property contains the initial configuration options of the widget. In order to set the value of the pointers, you should access the pointers property and use the value() method of the specific pointer.
E.g.

var gauge = $("#gauge").data("kendoRadialGauge");
gauge.pointers[0].value(20);

This is demonstrated in the following demo.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Gustavo
Top achievements
Rank 1
answered on 03 Jul 2015, 11:49 AM

Hi Dimiter, seems that this example does not work for TypeScript or is missing some reference.

I'm getting this error:‚Äč

0
Accepted
Dimiter Madjarov
Telerik team
answered on 03 Jul 2015, 12:39 PM

Hello Gustavo,

We will take a look at the issue. Regarding the current case, if the Gauge has only one pointer, you could directly use it's value method and the allValues method if there are multiple pointers.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Gustavo
Top achievements
Rank 1
answered on 03 Jul 2015, 12:52 PM

Thanks Dimiter! The method allValues solved my problem.

By the way, I get this error when I use the method value:

Tags
Gauges
Asked by
Gustavo
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Gustavo
Top achievements
Rank 1
Share this question
or