Radial Gauge with multiple pointers

3 posts, 1 answers
  1. Perry
    Perry avatar
    25 posts
    Member since:
    Feb 2019

    Posted 04 Jul Link to this post

    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. Answer
    Georgi
    Admin
    Georgi avatar
    544 posts

    Posted 08 Jul Link to this post

    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.
  3. Perry
    Perry avatar
    25 posts
    Member since:
    Feb 2019

    Posted 08 Jul in reply to Georgi Link to this post

    perfect, thanks!
Back to Top