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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Negative Numbers in Range

Thread ID:

Created:

Updated:

Platform:

Replies:

124078 May 13,2016 03:45 PM UTC May 16,2016 05:20 AM UTC Xamarin.Forms 1
loading
Tags: SfLinearGauge
James Knibb
Asked On May 13, 2016 03:45 PM UTC

Is there any way to use negative numbers in a LinearGauge? I'm wanting to use a scale which stretches between negative and positive numbers, but when using this pointers and ranges seem to get messed up and not show in the correct positions. 

The code below shows an example where the symbol pointer is not shown (also the chart doesn't seem to start at -15 either) :

SfLinearGauge linearGauge;
            linearGauge = new SfLinearGauge ();
            linearGauge.BackgroundColor = Color.White;
            linearGauge.Orientation = Orientation.OrientationVertical;
            //Scale
            ObservableCollection<LinearScale> scales = new ObservableCollection<LinearScale> ();
            LinearScale scale = new LinearScale ();
            scale.MinimumValue = -15;
            scale.MaximumValue = 15;
            scale.Interval = 5;
            scale.ScaleBarLength = 100;
            scale.ScaleBarColor = Color.FromRgb (250, 236, 236);
            scale.LabelColor = Color.FromRgb (84, 84, 84); 
            scale.MinorTicksPerInterval = 1;
            scale.ScaleBarSize = 13;
            scale.ScalePosition = ScalePosition.BackWard;

            List<LinearPointer> pointers = new List<LinearPointer> ();
            //SymbolPointer
            SymbolPointer symbolPointer = new SymbolPointer ();
            symbolPointer.Value = -10.0;
            symbolPointer.Offset = -0.17;
            symbolPointer.Thickness = 3;
            symbolPointer.Color = Color.FromRgb (65, 77, 79);
            pointers.Add (symbolPointer);

            //Minor Ticks setting
            LinearTickSettings minor = new LinearTickSettings ();
            minor.Length = 10;
            minor.Color = Color.FromRgb (175, 175, 175);
            minor.Thickness = 1;
            scale.MinorTickSettings = minor;

            //Major Ticks setting
            LinearTickSettings major = new LinearTickSettings ();
            major.Length = 10;
            major.Color = Color.FromRgb (175, 175, 175);
            major.Thickness = 1;
            scale.MajorTickSettings = major;

            scale.Pointers = pointers;
            scales.Add (scale);
            linearGauge.Scales = scales;
  

Paul Anderson S [Syncfusion]
Replied On May 16, 2016 05:20 AM UTC

Hi James,

Thank you for contacting Syncfusion Support.

We have created a new incident under your account for achieving Negative numbers in LinearGauge. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents/

Regards,
Paul Anderson

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.

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

;