This is a migrated thread and some comments may be shown as answers.

How to draw the needle on top

6 Answers 58 Views
Chart
This is a migrated thread and some comments may be shown as answers.
krystian
Top achievements
Rank 1
krystian asked on 19 Feb 2017, 08:56 AM
How to draw the needle on top

6 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 20 Feb 2017, 11:20 AM
Hello Кrystian,

You indicated that the Product of this thread is Chart for Xamarin Cross-Platform, but it seems that you are asking about the Gauge so I changed the Product to Gauges for Xamarin Cross-Platform.

At the moment the gauge lacks ZIndex functionality and the default order of drawing is as follows:
1. Axis elements are drawn first
2. Ranges are drawn on top
3. Indicators are drawn on top

Note that the indicators are drawn in the order they appear in the Indicators collection.

From the above explanation one expects to see that the needle should always be drawn on top of the ranges. But because this does not happen in your case, I suspect that the blue-green-red ring is not ranges, it is three bar indicators. Perhaps the bar indicators are added after the needle indicator and this is why it is below the bars. You need to simply add the needle last, after the bars.

Because you are using the the blue-green-red ring as ranges (not to show a particular value, but give meaningful context of the needle value) I suggest that you don't use bar indicators - use ranges.

I hope I was able to address your question accordingly. Let us know if you need more information.

Regards,
Petar Marchev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Petar Marchev
Telerik team
answered on 20 Feb 2017, 11:30 AM
I just realized that the Xamarin Forms Gauge control does not support minor ticks. Can you specify which component exactly are you using?

Regards,
Petar Marchev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
krystian
Top achievements
Rank 1
answered on 23 Feb 2017, 07:46 PM
I do not know which component is it? Unfortunately, changing the order of the needle does not help, still underneath. Jescze I question whether you can use several indicators next to each other on a single layout and how to do it
0
Petar Marchev
Telerik team
answered on 27 Feb 2017, 09:21 AM
Hi,

We cannot be of much help if we do not know which control you are using. We have different gauges - in WPF, in Android, in iOS, in WinForms and so on. You need to find out what type of project you are developing so that we know which team to refer the ticket to.


Regards,
Petar Marchev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
krystian
Top achievements
Rank 1
answered on 27 Feb 2017, 08:29 PM

Hello My project is being built in Xamarin android.

I have one question is whether interactivity gauges will be soon introduced to android. how far it is introduced to ios.

Regards

0
Todor
Telerik team
answered on 28 Feb 2017, 09:26 AM
Hello Krystian,

I'm glad we are now clear on the product that you are using. Regarding the first question about the needle - the solution Petar suggested for the Xamarin Forms Gauges is applicable for Xamarin.Android Gauges as well - the order in which you adds the indicators to your scale determines the order in which they are drawn. For example, if you generated the gauge from the first screen with a code similar to this:

scale1.AddIndicator(needle);           
scale1.AddIndicator(GetIndicator(34, 36, Color.Blue));
scale1.AddIndicator(GetIndicator(36.05f, 40, Color.Red));      

Then you simply need to change the order:

scale1.AddIndicator(GetIndicator(34, 36, Color.Blue));
scale1.AddIndicator(GetIndicator(36.05f, 40, Color.Red));
scale1.AddIndicator(needle);

If you are still having issues with the indicators, please add sample code (or project) that demonstrates how we can reproduce the issue in order to assist you further.

Regarding the interaction gauges, we already have such a request which you can vote for here. It is not yet planned so I can't give an exact date when to expect it, but if its votes increase, we will be more specific.

Regards,
Todor
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
krystian
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
krystian
Top achievements
Rank 1
Todor
Telerik team
Share this question
or