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 Elements in front of and behind the Gauge

Thread ID:

Created:

Updated:

Platform:

Replies:

119912 Aug 12,2015 06:02 PM Aug 14,2015 12:20 AM Android 3
loading
Tags: SfCircularGauge
AreM
Asked On August 12, 2015 06:02 PM

Hi,

I'm trying to add a PNG image in front of my Circular Gauge so that the shifting gauge is visible behind the image through empty squares. The way I'm attempting to do this is by adding the PNG in my XML file and then trying to program the CircularGauge in through the Java file to go behind it. I could go into more detail with my code, however, the fact that I have to set the Gauge as my entire view is the bigger issue that I think will prevent any method of mine from working. Is there any workaround? Why has Syncfusion programmed their gauge in this fashion? I think it limits the customizability and power of the gauge. Thank you

Nijamudeen Mohamed Sulaiman [Syncfusion]
Replied On August 13, 2015 04:55 AM

Hi Areeb,

Thanks for your interest in Syncfusion products.

We have analyzed the provided information and we suspect that your requirement is to set the Size of CircularGauge. This can be achieved by the following two ways and its code snippets.


1. Setting the RadiusFactor to CircularScale of CircularGauge.

Code snippet:


circularScale.setRadiusFactor(0.5);  // value ranges from 0.0 to 1.0



2. Setting the size for its parent layout.

Code snippet:


LinearLayout mLinearLayout = new LinearLayout(this);
 
LinearLayout.LayoutParams mBarParams=
new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
mBarParams.setMargins(
30, 30, 30, 30);
mBarParams.
height=500;
mBarParams.
width=300;

mLinearLayout.setLayoutParams(mBarParams);



We have prepared a simple sample based on this. Please find the sample below.

Sample Link: Gauge_Sizing_AndroidStudio

If the provided Sample does not meet your requirement, could you please modify the provided sample along with its reproducing procedure? It will be helpful for us to analyze on your requirement and provide you a possible solution.

Please let us know, if you have any queries.

 

Regards,
Nijamudeen M.

 
 


AreM
Replied On August 13, 2015 01:33 PM

This is great! I played around with the sample project and got the exact results I need, and this also allows plenty of flexibility. The scaling wasn't an issue, but placing separately configured gauges around the screen with overlying and underlying graphics was the goal and your project gave me the understanding to implement that. Thank you for the service!

Nijamudeen Mohamed Sulaiman [Syncfusion]
Replied On August 14, 2015 12:20 AM

Hi Areeb,


Thanks for your update.      


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


Regards,

Nijamudeen M.


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.

;