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.
Unfortunately, activation email could not send to your email. Please try again.

Adding opacity to a NeedlePointer (or a ghost needle to the SfCircularGauge)

Thread ID:

Created:

Updated:

Platform:

Replies:

121812 Jan 27,2016 04:36 PM Jan 28,2016 11:48 PM Xamarin.Forms 3
loading
Tags: SfCircularGauge
Philippe Bourque
Asked On January 27, 2016 04:36 PM

Hello, 

I want to add a ghost needle to my circular gauge.
I was thinking using many NeedlePointer and using opacity to make my ghost needle more and more transparent. 

The NeedlePointer do not have the Opacity properties.

There is way to control the opacity of a NeedlePointer? 

Of course, if you can help to implement a ghost needle by another way, I will be happy too : )

Thanks,

Phil

Sivakumar Punniya Moorthi [Syncfusion]
Replied On January 28, 2016 05:12 AM

 
Hi Phil,

Thank you for using Syncfusion products.


We have analyzed your requirement of setting opacity for Needle Pointer in CircularGauge control. Currently, there is no such property available to customize the opacity of needle pointer, but it can be achieved by set Alpha value for the Color property of Pointer. Please refer the below code snippet,
 
Code Snippets:

[C#]


Color firstNeedlePointerColor = Color.Blue;

double opacity = 0.2;

 // A from RGBA denotes alpha(opacity) value for the color

 needlePointer1.Color = Color.FromRgba(firstNeedlePointerColor.R,             firstNeedlePointerColor.G, firstNeedlePointerColor.B, opacity);




We have prepared a sample for the same, please find the sample below,

Sample: CircularGauge_Opacity

In the above sample, we have set alpha value properties for multiple pointer in circular gauge control.


If the provided solution doesn’t meet your requirement, please revert us back with more information, so that we could analyze on it and provide you better solution.

Regards,
Sivakumar P


Philippe Bourque
Replied On January 28, 2016 10:17 AM

Hello Sivakumar, 

Thanks for the quick answer.
Your snippet code is working perfectly! 

Phil

Sivakumar Punniya Moorthi [Syncfusion]
Replied On January 28, 2016 11:48 PM

Hi Phil,

Thanks for your update.     

We are glad to know that you have met your requirement. Please let us know if you need any further assistance.

Regards,
Sivakumar P

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;