Articles in this section
Category / Section

How to use multiple needle in WinForms RadialGauge?

1 min read

Adding multiple needle

You can use the multiple Needle by using the property named “EnableCustomNeedles” in RadialGauge. This requirement can be achieved by following the below steps.

 

1)Need to initialize the Needle by using the class named “Needle” in RadialGauge.

2)Need to add required Needle to NeedleCollection in RadialGauge.

C#

//Initialize the needle
Syncfusion.Windows.Forms.Gauge.Needle needle1 = new Syncfusion.Windows.Forms.Gauge.Needle();
Syncfusion.Windows.Forms.Gauge.Needle needle2 = new Syncfusion.Windows.Forms.Gauge.Needle();
Syncfusion.Windows.Forms.Gauge.Needle needle3 = new Syncfusion.Windows.Forms.Gauge.Needle();
 
//To add Needle to its collection
this.radialGauge1.NeedleCollection.Add(needle1);
this.radialGauge1.NeedleCollection.Add(needle2);
this.radialGauge1.NeedleCollection.Add(needle3);
 
//To enable the custom needles
this.radialGauge1.EnableCustomNeedles = true;
//To specify the Needle value
this.radialGauge1.NeedleCollection[0].Value = 0;
this.radialGauge1.NeedleCollection[1].Value = 10;
this.radialGauge1.NeedleCollection[2].Value = 20;

VB

'To initialize the Needle
Dim needle1 As New Syncfusion.Windows.Forms.Gauge.Needle()
Dim needle2 As New Syncfusion.Windows.Forms.Gauge.Needle()
Dim needle3 As New Syncfusion.Windows.Forms.Gauge.Needle()
 
'To add Needle to its collection
Me.radialGauge1.NeedleCollection.Add(needle1)
Me.radialGauge1.NeedleCollection.Add(needle2)
Me.radialGauge1.NeedleCollection.Add(needle3)
 
'To enable the custom needles
Me.radialGauge1.EnableCustomNeedles = True
'To specify the Needle value
Me.radialGauge1.NeedleCollection(0).Value = 0
Me.radialGauge1.NeedleCollection(1).Value = 10
Me.radialGauge1.NeedleCollection(2).Value = 20

 

Before enable the EnableCustomNeedles in RadialGauge

Figure 1. Before enabling the EnableCustomNeedles property in RadialGauge.

After enable the EnableCustomNeedles in RadialGauge

Figure 2. After enabling the EnableCustomNeedles property in RadialGauge.

Samples:

C#: RadialGauge_MultipleNeedle_C#

VB: RadialGauge_MultipleNeedle_VB

Reference link: https://help.syncfusion.com/windowsforms/radial-gauge/radial-gauge#adding-multiple-needles-to-radialgauge

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied