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. Image for the cookie policy date

Pointer changing

Hi,

I have a CircularGauge with three pointers displaying a pressure value. One pointer Shows the actual value, one shows the minimum and one shows the maximum.
values are also displayed in Labels.
Everything was ok until I upgraded my project from Essential Studio 14.1.0.41 to 14.3.0.49.
Now my all Show the same value (the current pressure). The Labels bound to the same data Show the correct values.
Here is my Code:

this.BindingContext = pressureMeasurementData;

 

Grid grid = new Grid {

VerticalOptions = LayoutOptions.FillAndExpand,

RowDefinitions =

{

new RowDefinition { Height = GridLength.Auto },

new RowDefinition { Height = GridLength.Auto },

new RowDefinition { Height = GridLength.Auto },

new RowDefinition { Height = GridLength.Auto },

new RowDefinition { Height = GridLength.Auto }

},

ColumnDefinitions =

{

new ColumnDefinition { Width = GridLength.Auto },

new ColumnDefinition { Width = GridLength.Auto }

}

};

grid.Children.Add(new Label {

Text = "Pressure"

}, 1, 1);

grid.Children.Add(new Label {

Text = "Min"

}, 1, 2);

grid.Children.Add(new Label {

Text = "Max"

}, 1, 3);

grid.Children.Add(new Label {

Text = "Unit"

}, 1, 4);

Label pressureLabel = new Label();

pressureLabel.SetBinding(Label.TextProperty, "Pressure");

grid.Children.Add(pressureLabel, 2, 1);

Label minLabel = new Label() { Text = "Min", TextColor= Color.Green };

minLabel.SetBinding(Label.TextProperty, "Min");

grid.Children.Add(minLabel, 2, 2);

Label maxLabel = new Label() { Text = "Max", TextColor = Color.Red };

maxLabel.SetBinding(Label.TextProperty, "Max");

grid.Children.Add(maxLabel, 2, 3);

grid.Children.Add(new Label {

Text = "bar"

}, 2, 4);

SfCircularGauge circularGauge = new SfCircularGauge();

circularGauge.HorizontalOptions = LayoutOptions.CenterAndExpand;

Scale scale = new Scale();

scale.StartValue = 0;

scale.EndValue = 100;

scale.Interval = 10;

scale.StartAngle = 135;

scale.SweepAngle = 270;

scale.RimThickness = 10;

scale.RimColor = Color.Gray;

scale.MinorTicksPerInterval = 4;

scale.LabelColor = Color.Black;

scale.LabelFontSize = 15;

scale.MajorTickSettings.Color = Color.Black;

scale.MinorTickSettings.Color = Color.Black;

scale.LabelOffset = 0.1;

NeedlePointer needlePointer = new NeedlePointer();

needlePointer.Color = Color.Black;

needlePointer.KnobColor = Color.Black;

needlePointer.Thickness = 2;

needlePointer.KnobRadius = 10;

needlePointer.LengthFactor = 0.7;

needlePointer.SetBinding(NeedlePointer.ValueProperty, "Pressure");

scale.Pointers.Add(needlePointer);

NeedlePointer minPointer = new NeedlePointer();

minPointer.Color = Color.Green;

minPointer.KnobColor = Color.Black;

minPointer.Thickness = 1;

minPointer.KnobRadius = 10;

minPointer.LengthFactor = 0.6;

minPointer.SetBinding(NeedlePointer.ValueProperty, "Min");

scale.Pointers.Add(minPointer);

NeedlePointer maxPointer = new NeedlePointer();

maxPointer.Color = Color.Red;

maxPointer.KnobColor = Color.Black;

maxPointer.Thickness = 1;

maxPointer.KnobRadius = 10;

maxPointer.LengthFactor = 0.6;

maxPointer.SetBinding(NeedlePointer.ValueProperty, "Max");

scale.Pointers.Add(maxPointer);

circularGauge.Scales.Add(scale);

grid.Children.Add(circularGauge, 1, 5);

Grid.SetColumnSpan(circularGauge,2);

Content = grid;

What am I doing wrong?



Attachment: screenshot_d0ef92b6.zip

1 Reply

SP Sivakumar Punniya Moorthi Syncfusion Team October 6, 2016 10:11 AM UTC

Hi Jens,

Thanks for using syncfusion products.

The reported issue has been fixed and we have created a new incident for follow up. You can download the custom assemblies for the fix from the incident.

Please let us know if you have any queries.

Regards,
Sivakumar P.


Loader.
Live Chat Icon For mobile
Up arrow icon