We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

EJ2: Trying to dynamically set the value of the pointer in linear gauge

Here's the code:

        gauge.setPointerValue(0, 0, Number);
        gauge.refresh();

I see the value change on the javascript object but it does not change the pointer position.

Any ideas?

Thanks,

Dave Jamison

3 Replies

DD Dharanidharan Dharmasivam Syncfusion Team November 9, 2018 09:08 AM UTC

Hi Dave, 
 
Greetings from Syncfusion, 
 
We have analyzed your query with the provided code snippet. You are using the refresh method after the setPointerValue method. In the setPointerValue method, you can pass the axis index, pointer index, and pointer value as parameters and with this method itself, the gauge will refresh with provided parameters, so there is no need to call the refresh method. But if you call the refresh method after the setPointerValue method, gauge refresh with present API’s in the sample level. If you want to change any instance of gauge, you can change and refresh by calling the refresh method. Otherwise, while using the public method like setPointerValue, you no need call the refresh method. 
 
Please find the below code snippet to achieve this requirement, 
 
gauge.setPointerValue( 
         0, // AxisIndex 
         0, // Pointer Index 
         pointerValue // Pointer Value 
); 
 
Sample your reference, can be found from below link, 
Kindly revert us, if you have any concerns. 
 
Regards, 
Dharani. 
 



PR Padmini Ramamurthy Syncfusion Team November 10, 2018 04:55 AM UTC

From: Jamison, David S CTR (US)
Sent: Friday, November 9, 2018 5:25 PM
To: Syncfusion Support <support@syncfusion.com>
Subject: RE: [Non-DoD Source] Syncfusion support community forum 140829, EJ2: Trying to dynamically set the value of the pointer in linear gauge, has been updated. 

Dharani,  
 
Thanks, that's what I needed. 
 
Dave Jamison 



DD Dharanidharan Dharmasivam Syncfusion Team November 12, 2018 09:08 AM UTC

Hi Dave, 
 
 
Most welcome. Kindly revert us if you need any further assistance. 
 
 
Thanks, 
Dharani. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon