Syncfusion Flutter Gauges
This skill covers two related Syncfusion Flutter components for data visualization and measurement displays: SfLinearGauge (Linear Gauge) and SfRadialGauge (Radial Gauge). While they share many visual and configuration features, they serve different display purposes with distinct visual representations.
When to Use This Skill
Use this skill when you need to:
- Display data on linear or radial scales for visual measurement representation
- Create progress indicators with custom styling and animations
- Build dashboard visualizations with KPIs, metrics, or performance indicators
- Implement measurement displays (speedometers, thermometers, pressure gauges)
- Add interactive gauges with draggable pointers and value changes
- Visualize ranges and thresholds on linear or circular scales
- Create custom gauge controls for volume, brightness, or rating inputs
- Display analog-style indicators in modern Flutter applications
- Build battery, signal, or status indicators with gauge representations
- Customize gauge appearance with colors, gradients, animations, and styling
Choosing the Right Component
Use SfLinearGauge (Linear Gauge) when:
- You need horizontal or vertical measurement displays
- Your data is best represented on a linear scale (bar-style)
- You want bar pointers for progress or level indicators
- Orientation flexibility is important (rotate 90° easily)
- Mirror effect is needed for symmetric displays
- Building: progress bars, sliders, battery indicators, volume controls, horizontal dashboards
Use SfRadialGauge (Radial Gauge) when:
- You need circular or arc-shaped displays
- Your visualization requires a needle pointer (classic gauge style)
- You want 360-degree or semi-circle representations
- Annotations with widgets need to be placed on the gauge
- Title support is needed above the gauge
- Export to image functionality is required
- Building: speedometers, RPM meters, temperature gauges, compass displays, clock faces, circular progress
Key Differences Summary:
| Feature | SfLinearGauge | SfRadialGauge |
|---|
| Primary Shape | Linear (horizontal/vertical) | Circular/Arc |
| Orientation | Horizontal, Vertical | Circular (360°) |
| Bar Pointer | ✅ Yes | ❌ No |
| Needle Pointer | ❌ No | ✅ Yes |
| Range Pointer | ❌ No | ✅ Yes |
| Marker Pointer | ✅ Shape & Widget | ✅ Shape & Widget |
| Mirror Effect | ✅ Yes | ❌ No |
| Annotations | ❌ No | ✅ Yes |
| Title Support | ❌ No | ✅ Yes |
| Export to Image | ❌ No | ✅ Yes |
| Multiple Axes | ❌ Limited | ✅ Yes |
| Axis Angles | N/A | ✅ Configurable |
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Installation and package setup for both components
- Basic SfLinearGauge implementation
- Basic SfRadialGauge implementation
- Package dependencies and imports
- Quick comparison and first examples
Component Overview
📄 For Linear Gauge: references/linear-gauge-overview.md
- SfLinearGauge widget overview and features
- When to use Linear Gauge vs Radial Gauge
- Orientation options (horizontal/vertical)
- Linear gauge-specific capabilities
- Basic linear gauge configuration
📄 For Radial Gauge: references/radial-gauge-overview.md
- SfRadialGauge widget overview and features
- When to use Radial Gauge vs Linear Gauge
- Circular and arc configurations
- Radial gauge-specific capabilities
- Title and multi-axis support
- Basic radial gauge configuration
Axes and Scales
📄 Read: references/axes.md
- Axis customization for both gauges
- Linear axis (track, thickness, colors)
- Radial axis (circular arc, angles, radius)
- Minimum and maximum values
- Axis intervals and scale
- Axis line styling and gradients
- Labels and ticks positioning
- Inverse axis direction
- Custom scales and renderers
- Multiple axes (radial)
Pointers
📄 Read: references/pointers.md
- Pointer types overview
- Shape/Marker pointers (both gauges)
- Widget pointers (both gauges)
- Bar pointer (Linear Gauge only)
- Needle pointer (Radial Gauge only)
- Range pointer (Radial Gauge only)
- Multiple pointers configuration
- Pointer positioning and styling
- Pointer comparison and selection guide
Ranges
📄 Read: references/ranges.md
- Range visualization concepts
- Adding ranges to Linear Gauge
- Adding ranges to Radial Gauge
- Range colors and gradients
- Range positioning and thickness
- Multiple ranges configuration
- Range use cases and patterns
Customization and Styling
📄 Read: references/customization.md
- Visual appearance for both gauges
- Colors (solid and gradients)
- Thickness and sizing
- Border customization
- Corner and edge styles
- Background colors and images
- Theme integration
- Label and tick styling
Animation
📄 Read: references/animation.md
- Animation support in both gauges
- Pointer animations
- Axis and range animations
- Animation duration and easing
- enableAnimation property
- Animation callbacks
- Loading animations
Interaction
📄 Read: references/interaction.md
- Pointer dragging for both gauges
- enableDragging property
- Value change events
- onValueChangeStart, onValueChanging, onValueChanged, onValueChangeEnd
- Touch and gesture support
- Interactive value updates
- Restricting drag ranges
Accessibility
📄 Read: references/accessibility.md
- Screen reader support
- Semantic labels for gauges
- WCAG compliance
- Keyboard navigation
- Accessibility for Linear Gauge
- Accessibility for Radial Gauge
- Best practices
Advanced Features
📄 Read: references/advanced-features.md
- Mirror gauge (Linear Gauge)
- Annotations with widgets (Radial Gauge)
- Export to image (Radial Gauge)
- Background images (Radial Gauge)
- Custom label formatting
- Custom renderers and builders
- Special configurations
- Edge cases and troubleshooting
Quick Start Examples
For detailed setup instructions, see Getting Started.
Basic Linear Gauge
dart
import 'package:syncfusion_flutter_gauges/gauges.dart';
SfLinearGauge(
minimum: 0,
maximum: 100,
barPointers: [LinearBarPointer(value: 60)],
markerPointers: [LinearShapePointer(value: 60)],
)
Basic Radial Gauge
dart
import 'package:syncfusion_flutter_gauges/gauges.dart';
SfRadialGauge(
axes: [
RadialAxis(
minimum: 0,
maximum: 150,
pointers: [NeedlePointer(value: 90)],
),
],
)
Interactive Gauge (Draggable)
dart
double _value = 50.0;
// Linear with dragging
SfLinearGauge(
markerPointers: [
LinearShapePointer(
value: _value,
enableDragging: true,
onChanged: (v) => setState(() => _value = v),
),
],
)
// Radial with dragging
SfRadialGauge(
axes: [
RadialAxis(
pointers: [
NeedlePointer(
value: _value,
enableDragging: true,
onValueChanged: (v) => setState(() => _value = v),
),
],
),
],
)
Common Patterns
Multi-Range Status Indicators:
dart
ranges: [
LinearGaugeRange(startValue: 0, endValue: 30, color: Colors.red),
LinearGaugeRange(startValue: 30, endValue: 70, color: Colors.yellow),
LinearGaugeRange(startValue: 70, endValue: 100, color: Colors.green),
]
Gradient Styling:
dart
axisTrackStyle: LinearAxisTrackStyle(
gradient: LinearGradient(colors: [Colors.blue, Colors.purple]),
)
Vertical Orientation:
dart
SfLinearGauge(
orientation: LinearGaugeOrientation.vertical,
barPointers: [LinearBarPointer(value: 75)],
)
Custom Angles (Semi-Circle):
dart
RadialAxis(startAngle: 180, endAngle: 0)
Mirror Effect:
dart
SfLinearGauge(isMirrored: true)
Key Properties
SfLinearGauge Essential Properties
- - Minimum value of the axis (default: 0)
- - Maximum value of the axis (default: 100)
- - Interval between axis labels
- - Horizontal or vertical orientation
- - Mirror the gauge elements
- - Reverse axis direction
- - Styling for axis track (color, thickness, gradient, borders)
- - Extend axis track at both ends
- - Show/hide axis track
- - Show/hide axis labels
- - Show/hide tick marks
- - Inside or outside label placement
- - Inside or outside tick placement
- - Distance between ticks and labels
- - Custom label formatting
- - List of LinearGaugeRange for colored segments
- - List of shape or widget pointers
- - List of bar pointers (progress style)
- - Animation duration in milliseconds
- - Custom label generation callback
- - Custom scale conversion
SfRadialGauge Essential Properties
- - GaugeTitle for gauge heading
- - Background color for gauge
- - List of RadialAxis (supports multiple)
- - Show loading animation
- - Animation duration in milliseconds
RadialAxis Essential Properties
- - Minimum value of axis (default: 0)
- - Maximum value of axis (default: 100)
- - Interval between labels
- - Starting angle of axis (default: 270)
- - Ending angle of axis (default: 270)
- - Radius size factor (0-1)
- - Horizontal center position (0-1)
- - Vertical center position (0-1)
- - Reverse axis direction
- - Position axis based on angles
- - Rotate labels based on angle
- - Show/hide first label
- - Show/hide last label
- - Max labels per 100 logical pixels
- - AxisLineStyle for axis line
- - Show/hide axis line
- - Show/hide labels
- - Show/hide ticks
- - GaugeTextStyle for labels
- - Label format string (prefix/suffix)
- - NumberFormat for globalization
- - Inside or outside placement
- - Inside or outside placement
- - MajorTickStyle customization
- - MinorTickStyle customization
- - Minor ticks count
- - Distance from axis
- - Distance from ticks
- - Logical pixels or factor
- - AssetImage for axis background
- - List of GaugeRange
- - List of GaugePointer
- - List of GaugeAnnotation
- - Label creation callback
- - Axis tap callback
- - Custom renderer callback
LinearGauge Range Properties
- - Start value of range
- - End value of range
- - Range color
- - Starting width
- - Ending width
- - Inside, outside, or cross
- - Flat or curve shape
RadialGauge Range Properties
- - Start value of range
- - End value of range
- - Range color
- - Starting width
- - Ending width
- - Gradient for range
- - Offset from axis
- - Logical pixels or factor
- - Text label for range
Pointer Properties (Common)
- - Pointer value
- - Enable pointer dragging
- - Enable pointer animation
- - Animation duration
- - Animation curve type
- - Drag start callback
- - Drag progress callback
- - Value changed callback
- - Drag end callback
Common Use Cases
- Progress Indicators - Use LinearBarPointer or RangePointer for progress tracking
- Speedometer Dashboard - Use RadialGauge with NeedlePointer and ranges
- Temperature Display - Use vertical LinearGauge or semi-circle RadialGauge
- Battery Indicator - Use LinearGauge with mirror effect and ranges
- Volume/Brightness Control - Use draggable LinearShapePointer
- KPI Dashboard - Use multiple RadialGauges with annotations
- Rating Display - Use RadialGauge with semi-circle and RangePointer
- Fuel Gauge - Use RadialGauge with needle and color ranges
- Loading Indicator - Use animated LinearBarPointer or RangePointer
- Slider Alternative - Use interactive LinearGauge with draggable pointer