How to remove extra space when adding semi/quarter circular in Flutter SfRadialGauge?
In Syncfusion® Flutter Radial Gauge, you can remove the space occupied below the half or quarter radial gauge.
Step 1: Create a semi-circular or quarter radial gauge using the startAngle and endAngle properties of the radial axis. By default, the axis will be positioned based on the available size's center position, as shown in the following images.
Circular gauge
Semi-circular gauge
Step 2: You can reduce the empty space occupied below the semi-circular gauge using the canScaleToFit property in the radial axis, which is used to adjust the position of the axis.
@override Widget build(BuildContext context) { return Scaffold( body: SfRadialGauge( axes: <RadialAxis>[ RadialAxis( startAngle: 180, endAngle: 360, canScaleToFit: true, ), ], ), ); }
The semi-circular gauge will be positioned at the center of its parent when you enable the canScaleToFit property.
Output
Check the following links for more features in Syncfusion® Flutter Radial Gauge:
- Syncfusion® Flutter Radial Gauge product page
- User guide documentation for Syncfusion® Flutter Radial Gauge
- pub.dev
Live samples
Blogs related to Radial Gauge
- Introduction to Flutter Radial Gauge widget
- Different styles of radial slider using Flutter Radial Gauge
Conclusion
I hope you enjoyed learning about how to remove extra space when adding semi/quarter circular in Flutter SfRadialGauge.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!