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

Radial Gauge with multiple pointers

2 Answers 41 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Perry
Top achievements
Rank 1
Perry asked on 04 Jul 2019, 09:15 PM

I have a radial guage with 2 pointers.   The initial value can be set in the view model for both pointers but when I change the value in the model using Set, only one of the pointers gets changed.  How can i modify both pointer values?

I've created a dojo showing this.

 

https://dojo.telerik.com/AkEKaSes

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi
Telerik team
answered on 08 Jul 2019, 12:25 PM
Hello Perry,

Currently the gauge is bound to the selectedPumpRate field.

e.g.

data-bind="value: selectedPumpRate"

Thus when the selectedPumpRate is modified, the value of the widget is changed. However, the value of the gauge is the first pointer, therefore using the data-bind attribute you are able to modify only the value of the first pointer.

To modify the rest of the pointers you could use the pointer.value method.

e.g.

goToView2: function(e) {
 
  var gauge = $('[data-role="radialgauge"]').data('kendoRadialGauge');
 
  gauge.pointers[0].value(this.newValue1)
  gauge.pointers[1].value(this.newValue2)
 
}

Below you will find a modified version of the sample:



Regards,
Georgi
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Perry
Top achievements
Rank 1
answered on 08 Jul 2019, 05:53 PM
perfect, thanks!
Tags
MVVM
Asked by
Perry
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Perry
Top achievements
Rank 1
Share this question
or