How to manually change values of only one of the scales.

Hi, I have created a circular gauge with 2 scales, one on the left hand side and one on the right hand side. I want to manually change the values of either of them when I perform a function, so I have to change it like this:

For Scale 1,

$(#IDNAME).ejCircularGauge({

    scales: [{

 changes are made here for scale 1 only. 

},{}]

})


Similarly for scale 2, I leave the first brackets empty and write my changes in the second. Is there anyway to give names to each scale so I do not have to edit it like this? If some sort of ID or class could be given to each scale, it would make customizing them much more eas


1 Reply

IR Indumathi Ravi Syncfusion Team February 14, 2022 12:27 PM UTC

Hi Spruha, 
Thank you for contacting Syncfusion Support. 
We are unable to reproduce the reported issue with the provided scenario in the Circular Gauge component of version 19.4.0.48. We can’t able to render the scales on left and right side of the Circular Gauge. So, we have created a sample with two scales with the same center position in the control. 
The Circular Gauge control will be reinitialized with the provided code snippet in your update. However, we can update the properties in the scale of the Circular Gauge by accessing its instance. Please find the code snippet below for your reference. 
Code Snippet
var circulargaugeObj = $("#CoreCircularGauge").data("ejCircularGauge"); 
circulargaugeObj.model.scales[1].pointers[0].value = 80; 
circulargaugeObj.redraw(); 
Please find the sample for your reference below. 
If the above sample do not meet your requirements, please modify the above sample to reproduce the reported issue and share the same to us. It will be helpful for us to analyze and assist you further. 
   
Regards, 
Indumathi R 


Loader.
Up arrow icon