In my Xamarin project made with appMap iu have grid with 5 columns and i want to add a XamRadialGauge in a row with Grid.ColumnSpan="3" and fill it but its show small:
}
Thios is my xaml code
<Grid BackgroundColor="White" VerticalOptions="FillAndExpand"> <Grid.ColumnDefinitions> <ColumnDefinition Width="5*" /> <ColumnDefinition Width="43*" /> <ColumnDefinition Width="4*" /> <ColumnDefinition Width="43*" /> <ColumnDefinition Width="5*" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="5*"/> <RowDefinition Height="10*"/> <RowDefinition Height="25*"/> <RowDefinition Height="5*"/> <RowDefinition Height="20*"/> <RowDefinition Height="5*"/> <RowDefinition Height="20*" /> <RowDefinition Height="10*"/> </Grid.RowDefinitions>
<igGauges:XamRadialGauge Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="5" BackgroundColor="#00000000" BackingBrush="#E6E8F1F2" BackingInnerExtent="0.09" BackingOuterExtent="0.8" BackingOutline="#00E31717" BackingShape="Fitted" FontBrush="#FF000000" FontSize="10" Interval="25" MinorTickBrush="#FF000000" MinorTickStartExtent="0.53" MinorTickStrokeThickness="1.5" NeedleBrush="#FF000000" NeedleEndExtent="0.55" NeedleOutline="#00FFFFFF" NeedlePivotBrush="#FF000000" NeedlePivotOutline="#00FFFFFF" NeedlePivotStrokeThickness="0" NeedlePivotWidthRatio="0" NeedlePointFeatureWidthRatio="0" NeedleShape="Triangle" NeedleStartWidthRatio="0.05" NeedleStrokeThickness="0" ScaleBrush="#00FF0A0A" ScaleEndAngle="0" ScaleStartAngle="180" TickBrush="#FF000000" TickStartExtent="0.49" TickStrokeThickness="2.5" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" HeightRequest="500"> <igGauges:XamRadialGauge.Ranges> <igGauges:RadialGaugeRange EndValue="25" InnerEndExtent="0.35" InnerStartExtent="0.39" OuterEndExtent="0.45" OuterStartExtent="0.45" StartValue="0" /> <igGauges:RadialGaugeRange EndValue="75" InnerEndExtent="0.3" InnerStartExtent="0.35" OuterEndExtent="0.45" OuterStartExtent="0.45" StartValue="25" /> <igGauges:RadialGaugeRange EndValue="100" InnerEndExtent="0.35" InnerStartExtent="0.35" OuterEndExtent="0.45" OuterStartExtent="0.45" StartValue="75" /> </igGauges:XamRadialGauge.Ranges> </igGauges:XamRadialGauge>
It's reserving space. The reasoning is because it's a half circle. Remove BackingShape="Fitted" and it takes up the entire height of the rectangle.
Thanks for the answer,
I change from XAML to C# follow the instructions on https://ko.infragistics.com/help/xamarin/19.1/radialgauge-configuring-the-scale, and apply your recommendation and see i this way:
And i I'm looking something like this
But also when I applied this example:
I have this error:
Said "Cant convert from type 'Xamarin.forms.SolidColorBirsh' to 'Infragistics.XamarinForms.Brush'"
I have this using
using Xamarin.Forms;using Infragistics.XamarinForms.Controls.Gauges;
I missed something?
Thanks in advance
Alejandro Castrejon
Hello Alejandro,
Thank you for following up. You'll have to use our SolidColorBrush and not the XamarinForms provided on.
this.radialGauge1.ScaleBrush = new Infragistics.XamarinForms.SolidColorBrush(Color.Red);
Thanks It's works fine
I will explain for if other see this post
The property: .CenterY = .90; move the center of the gauge almost to the bottom left gap
The property: .RadiusMultiplier = 2; make it bigger to fill the cell
You can achieve this with the RadiusMultiplier="1.25" and CenterY=".90" properties.
That´s works great
Thanks a lot
Cn you share me a example or point me to how convert the gauge 1 to gauge on C# code 2 please
1)
2)