)
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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to use multiple needle in WinForms RadialGauge?

Platform: WinForms |
Control: RadialGauge |
Published Date: November 20, 2015 |
Last Revised Date: January 7, 2020

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

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon