Implementing Syncfusion Blazor Linear Gauges
NuGet: Syncfusion.Blazor.LinearGauge + Syncfusion.Blazor.Themes
Namespace: Syncfusion.Blazor.LinearGauge
When to Use This Skill
Use this skill when the user needs to:
- Visualize numeric values on a linear scale (horizontal or vertical)
- Display measurement data like temperature, pressure, speed, or progress
- Create dashboard components with gauge visualizations
- Implement KPI displays with ranges and indicators
- Show real-time data with animated pointers
- Build interactive gauges where users can drag pointers to change values
- Create multi-scale visualizations with multiple axes and pointers
The Syncfusion Blazor Linear Gauge is ideal for applications requiring precise numeric visualization with customizable scales, pointers, and ranges.
Component Overview
The Blazor Linear Gauge (SfLinearGauge) is a data visualization component that displays numeric values on a linear scale with features including:
- Multiple axes with customizable ranges and styling
- Various pointer types (marker shapes, bar pointers, text, images)
- Color-coded ranges for value categorization
- Annotations for labels and custom content
- Interactive features including drag-to-change pointer values
- Events and methods for dynamic updates
- Accessibility support with WCAG compliance
- Internationalization for global applications
Documentation and Navigation Guide
This skill provides comprehensive, self-contained reference files for each aspect of the Linear Gauge component. Read the appropriate reference based on your current need.
Getting Started
📄 Read: references/getting-started.md
When to read: First-time setup, new project initialization, installation questions
What's covered:
- Installation via Visual Studio, VS Code, and .NET CLI
- NuGet package installation (Syncfusion.Blazor.LinearGauge, Syncfusion.Blazor.Themes)
- Namespace imports and service registration
- Stylesheet and script references
- Basic LinearGauge component implementation
- Adding pointers and setting values
- Adding titles and ranges
- Running your first gauge application
Core Components
Axes Configuration
📄 Read: references/axes-configuration.md
When to read: Setting up gauge scales, customizing axis appearance, working with multiple axes
What's covered:
- Setting Minimum and Maximum values for the scale
- Line customization (height, width, color, offset)
- Major ticks configuration (interval, height, color, width, position, offset)
- Minor ticks configuration (interval, height, color, width, position, offset)
- Label customization (format, font, position, offset)
- Multiple axes on single gauge
- Inverse axis direction
- Opposed position for axes
- Complete code examples for all configurations
Pointers
📄 Read: references/pointers.md
When to read: Adding value indicators, customizing pointer appearance, implementing multiple pointers
What's covered:
- Setting pointer values
- Marker pointers with various shapes (Circle, Rectangle, Triangle, Diamond, InvertedTriangle)
- Bar pointers with customization options
- Image pointers with custom images
- Text pointers with custom styling
- Pointer positioning and placement
- Animation configuration for smooth transitions
- Multiple pointers on single axis
- Drag and drop interaction for value changes
- Complete examples for each pointer type
Ranges
📄 Read: references/ranges.md
When to read: Adding color-coded value regions, implementing performance zones, creating visual thresholds
What's covered:
- Setting range start and end values
- Range color customization
- Range positioning (inside, outside, cross)
- Range offset configuration
- Start and end width for gradient effects
- Multiple ranges on single axis
- Practical use cases (temperature zones, performance indicators, status ranges)
- Complete code examples with visual results
Appearance and Styling
Annotations
📄 Read: references/annotations.md
When to read: Adding labels, custom content, units, or dynamic text to the gauge
What's covered:
- Adding text annotations
- HTML content in annotations
- Positioning annotations with x, y coordinates
- Z-index for layering multiple annotations
- Font styling for text annotations
- Horizontal and vertical alignment
- Multiple annotations on gauge
- Dynamic content updates
- Practical examples (unit labels, value displays, warnings)
Appearance and Styling
📄 Read: references/appearance-and-styling.md
When to read: Customizing gauge look and feel, theming, responsive design, print styling
What's covered:
- Container customization (width, height, background, border)
- Orientation (horizontal vs vertical)
- Margin and container adjustments
- Title customization (text, font, position)
- Theme selection (Bootstrap, Material, Fabric, Fluent, Tailwind, etc.)
- Custom CSS styling
- Responsive design considerations
- Color schemes and palettes
- Print-friendly styling
- Complete styling examples
Advanced Features
Methods and Events
📄 Read: references/methods-and-events.md
When to read: Implementing dynamic updates, handling user interactions, programmatic control
What's covered:
- setPointerValue() method for dynamic pointer updates
- setAnnotationValue() method for annotation updates
- print() method for printing gauges
- refresh() method for re-rendering
- Load and Loaded events
- AnimationComplete event
- AxisLabelRendering event for label customization
- AnnotationRendering event
- ValueChange event for user interactions
- TooltipRendering event
- ResizeCompleted event
- Complete event handler examples with practical scenarios
User Interaction
📄 Read: references/user-interaction.md
When to read: Enabling tooltips, drag interactions, mouse/touch events, value changes
What's covered:
- Tooltip configuration and customization
- Tooltip templates with custom HTML
- Pointer drag to change values
- Enabling/disabling pointer interaction
- Mouse and touch event handling
- Value change tracking and callbacks
- Animation on user interaction
- Complete interactive examples
Accessibility and Internationalization
📄 Read: references/accessibility-and-internationalization.md
When to read: Implementing WCAG compliance, keyboard navigation, screen readers, global applications
What's covered:
- Accessibility overview (WCAG 2.1 Level AA compliance)
- Keyboard navigation support
- Screen reader compatibility
- ARIA attributes and labels
- High contrast mode support
- Focus indicators
- Internationalization (i18n) setup
- Number formatting for different locales
- RTL (Right-to-Left) support
- Complete accessibility implementation examples
Quick Start Example
Here's a minimal example to get started with Blazor Linear Gauge:
@using Syncfusion.Blazor.LinearGauge
<SfLinearGauge Title="Temperature Monitor">
<LinearGaugeAxes>
<LinearGaugeAxis Minimum="0" Maximum="120">
<LinearGaugeAxisLabelStyle Format="{value}°C"></LinearGaugeAxisLabelStyle>
<LinearGaugePointers>
<LinearGaugePointer PointerValue="65" Color="#007bff">
</LinearGaugePointer>
</LinearGaugePointers>
<LinearGaugeRanges>
<LinearGaugeRange Start="0" End="40" Color="#4CAF50"></LinearGaugeRange>
<LinearGaugeRange Start="40" End="80" Color="#FFC107"></LinearGaugeRange>
<LinearGaugeRange Start="80" End="120" Color="#F44336"></LinearGaugeRange>
</LinearGaugeRanges>
</LinearGaugeAxis>
</LinearGaugeAxes>
</SfLinearGauge>
Result: A vertical linear gauge showing temperature from 0°C to 120°C with three color-coded ranges (green, yellow, red) and a pointer at 65°C.
Common Patterns
Pattern 1: Simple Progress Indicator
Use case: Show completion percentage or progress status
@using Syncfusion.Blazor.LinearGauge
<SfLinearGauge Orientation="Syncfusion.Blazor.LinearGauge.Orientation.Horizontal" Width="400px" Height="80px">
<LinearGaugeAxes>
<LinearGaugeAxis Minimum="0" Maximum="100">
<LinearGaugePointers>
<LinearGaugePointer PointerValue="75" Type="Syncfusion.Blazor.LinearGauge.Point.Bar"
Color="#28a745" Width="20">
</LinearGaugePointer>
</LinearGaugePointers>
</LinearGaugeAxis>
</LinearGaugeAxes>
</SfLinearGauge>
Pattern 2: Multi-Scale Dashboard Gauge
Use case: Display multiple metrics on one gauge
@using Syncfusion.Blazor.LinearGauge
<SfLinearGauge>
<LinearGaugeAxes>
<LinearGaugeAxis Minimum="0" Maximum="100">
<LinearGaugePointers>
<LinearGaugePointer PointerValue="60" Color="#007bff"></LinearGaugePointer>
<LinearGaugePointer PointerValue="80" Color="#dc3545"></LinearGaugePointer>
</LinearGaugePointers>
</LinearGaugeAxis>
</LinearGaugeAxes>
</SfLinearGauge>
Pattern 3: Interactive Value Adjuster
Use case: Allow users to change values by dragging the pointer
@using Syncfusion.Blazor.LinearGauge
<SfLinearGauge>
<LinearGaugeEvents ValueChange="@OnValueChange"></LinearGaugeEvents>
<LinearGaugeAxes>
<LinearGaugeAxis Minimum="0" Maximum="100">
<LinearGaugePointers>
<LinearGaugePointer PointerValue="@currentValue"
EnableDrag="true">
</LinearGaugePointer>
</LinearGaugePointers>
</LinearGaugeAxis>
</LinearGaugeAxes>
</SfLinearGauge>
@code {
private double currentValue = 50;
private void OnValueChange(ValueChangeEventArgs args)
{
currentValue = args.Value;
}
}
Pattern 4: Styled Thermometer
Use case: Temperature display with visual zones
@using Syncfusion.Blazor.LinearGauge
<SfLinearGauge Width="150px" Height="400px">
<LinearGaugeAxes>
<LinearGaugeAxis Minimum="-20" Maximum="120">
<LinearGaugeAxisLabelStyle Format="{value}°">
</LinearGaugeAxisLabelStyle>
<LinearGaugePointers>
<LinearGaugePointer PointerValue="@temperature"
Type="Syncfusion.Blazor.LinearGauge.Point.Bar"
Color="#ff6b6b"
Width="20">
</LinearGaugePointer>
</LinearGaugePointers>
<LinearGaugeRanges>
<LinearGaugeRange Start="-20" End="0" Color="#0099ff"></LinearGaugeRange>
<LinearGaugeRange Start="0" End="25" Color="#00e676"></LinearGaugeRange>
<LinearGaugeRange Start="25" End="120" Color="#ff5252"></LinearGaugeRange>
</LinearGaugeRanges>
</LinearGaugeAxis>
</LinearGaugeAxes>
</SfLinearGauge>
@code {
private double temperature = 35;
}
API Reference
The official Linear Gauge API is centered on the SfLinearGauge component and comprehensive child components for configuring axes, pointers, ranges, annotations, gradients, tooltips, and event handlers. This reference is based on the official Syncfusion Blazor Linear Gauge API documentation.
SfLinearGauge
Primary container component for the gauge. This is the root component that hosts all gauge elements.
Component Properties:
Sizing & Layout:
Width(string): Sets the width of the linear gauge containerHeight(string): Sets the height of the linear gauge containerOrientation(Orientation): Sets the gauge orientation (HorizontalorVertical)Description(string): Sets the description for accessibility purposes
Appearance:
Title(string): Sets the title text displayed on the gaugeTitleStyle(LinearGaugeTitleStyle): Configures title font, position, and stylingBackground(string): Sets the background color of the gauge containerTheme(Theme): Applies predefined themes (Bootstrap, Material, Fabric, Fluent, Tailwind, etc.)Container(LinearGaugeContainer): Configures the container appearance and borderMargin(LinearGaugeMargin): Sets left, right, top, and bottom margins
Behavior:
AnimationDuration(double): Sets the animation duration (in milliseconds) for initial rendering and pointer updatesFormat(string): Sets the number format for axis labelsEnableGroupingSeparator(bool): Enables thousand separators in numbersID(string): Sets the unique identifier for the gauge componentTabIndex(int): Sets the tab order for keyboard navigation
Export & Print:
AllowPrint(bool): Enables print functionalityAllowPdfExport(bool): Enables PDF export functionalityAllowImageExport(bool): Enables image export (PNG, SVG) functionalityAllowMargin(bool): Includes margins when printing or exporting
Styling:
RangePalettes(string[]): Defines automatic color palette for ranges
Methods:
// Update pointer value programmatically (async version)
public async Task SetPointerValueAsync(int axisIndex, int pointerIndex, double value)
// Update annotation content dynamically (async version)
public async Task SetAnnotationValueAsync(int annotationIndex, string content)
// Refresh the entire gauge (async version)
public async Task RefreshAsync()
// Print the gauge (requires AllowPrint="true")
public async Task PrintAsync()
// Export gauge to file (requires corresponding AllowXyzExport="true")
public async Task ExportAsync(ExportType type, string fileName,
PdfPageOrientation? orientation = null, bool allowDownload = true)
Export Types:
ExportType.PNGExportType.SVGExportType.PDF
LinearGaugeAxes & LinearGaugeAxis
Container (LinearGaugeAxes) for one or more axes. Each LinearGaugeAxis defines a scale with range, ticks, labels, pointers, and ranges.
LinearGaugeAxis Properties:
Scale Configuration:
Minimum(double): Sets the minimum value of the axis scaleMaximum(double): Sets the maximum value of the axis scaleIsInversed(bool): Reverses the direction of the axis (high to low instead of low to high)OpposedPosition(bool): Places the axis on the opposite side (left/right for vertical, top/bottom for horizontal)ShowLastLabel(bool): Shows or hides the last label on the axis
Child Components:
LinearGaugeLine- Configures the axis line appearanceLinearGaugeMajorTicks- Major tick marks on the axisLinearGaugeMinorTicks- Minor tick marks on the axisLinearGaugeAxisLabelStyle- Label styling and positioningLinearGaugeAxisLabelFont- Font properties for axis labelsLinearGaugeContainer- Container for the axisLinearGaugePointers- Pointer collection for this axisLinearGaugeRanges- Range collection for this axisLinearGaugeLinearGradient- Gradient fill for axis elementsLinearGaugeRadialGradient- Radial gradient for axis elements
Axis Line & Ticks
LinearGaugeLine - Defines the axis line appearance
Height(double): Height of the axis lineWidth(double): Width of the axis lineColor(string): Color of the axis lineOffset(double): Offset from axis
LinearGaugeMajorTicks - Major tick configuration
Interval(double): Interval between major ticksHeight(double): Height of major tick marksWidth(double): Width of major tick marksColor(string): Color of major ticksPosition(Position): Position relative to axis (Inside,Outside,Cross)Offset(double): Offset from axis line
LinearGaugeMinorTicks - Minor tick configuration
Interval(double): Interval between minor ticksHeight(double): Height of minor tick marksWidth(double): Width of minor tick marksColor(string): Color of minor ticksPosition(Position): Position relative to axisOffset(double): Offset from axis line
Axis Labels
LinearGaugeAxisLabelStyle - Label styling and positioning
Format(string): Format string for label values (e.g., "{value}°C")Position(Position): Label position (Inside,Outside,Cross)Offset(double): Distance from axis lineFontFamily(string): Font family for labelsColor(string): Color of label textOpacity(double): Opacity of labels (0 to 1)
LinearGaugeAxisLabelFont - Font properties for axis labels
FontFamily(string): Font family nameFontSize(string): Font size in pixels or relative unitsFontStyle(string): Font style (normal, italic, oblique)FontWeight(string): Font weight (normal, bold, lighter, bolder, 100-900)
LinearGaugePointers & LinearGaugePointer
Container (LinearGaugePointers) for one or more value indicators. Each LinearGaugePointer represents a value on the axis.
LinearGaugePointer Properties:
Value & Type:
PointerValue(double): Sets the pointer valueType(PointerType): Pointer type (MarkerorBar)MarkerType(MarkerType): Shape of marker pointer:CircleRectangleTriangleDiamondInvertedTriangle
Appearance:
Color(string): Pointer colorWidth(double): Width of pointerHeight(double): Height of pointerOpacity(double): Opacity of pointer (0 to 1)Offset(double): Offset from axis linePlacement(Placement): Placement relative to axis (Center,Near,Far)RoundedCornerRadius(double): Radius for rounded corners (bar pointers)
Content:
ImageUrl(string): URL for image pointerText(string): Text to display with text pointer
Interaction:
EnableDrag(bool): Allows user to drag the pointer to change valueAnimationDuration(double): Duration of value change animation (milliseconds)
Child Components:
LinearGaugePointerBorder- Border styling for pointerLinearGaugeMarkerTextStyle- Text styling for text pointers
Pointer Styling
LinearGaugePointerBorder - Pointer border properties
Color(string): Border colorWidth(double): Border width
LinearGaugeMarkerTextStyle - Text styling for pointer text
FontFamily(string): Font familyFontSize(string): Font sizeColor(string): Text colorFontWeight(string): Font weightOpacity(double): Text opacity
LinearGaugeRanges & LinearGaugeRange
Container (LinearGaugeRanges) for color-coded value zones. Each LinearGaugeRange defines a colored region.
LinearGaugeRange Properties:
Range Definition:
Start(double): Start value of the rangeEnd(double): End value of the range
Appearance:
Color(string): Background color of the rangeStartWidth(double): Width at start of range (for gradient width effect)EndWidth(double): Width at end of rangePosition(Position): Position relative to axis (Inside,Outside,Cross)Offset(double): Offset from axis line
Child Components:
LinearGaugeRangeBorder- Border styling for rangeLinearGaugeRangeTooltipSettings- Tooltip for range (hover)
LinearGaugeRangeBorder - Range border properties
Color(string): Border colorWidth(double): Border width
LinearGaugeAnnotations & LinearGaugeAnnotation
Container (LinearGaugeAnnotations) for text or HTML overlays. Each LinearGaugeAnnotation adds a label or custom content.
LinearGaugeAnnotation Properties:
Content & Positioning:
AxisValue(double): Position on the axis where annotation appearsAxisIndex(int): Index of the axis (if multiple axes)X(double): Horizontal pixel offset from axis valueY(double): Vertical pixel offset from axis valueZIndex(int): Layer order (higher appears on top)HorizontalAlignment(Alignment): Horizontal alignment (Near,Center,Far)VerticalAlignment(Alignment): Vertical alignment
Content:
Content(string): Text or HTML content for annotationContentTemplate(RenderFragment): Template for rendering annotation content
Child Components:
LinearGaugeAnnotationFont- Font styling for text annotations
LinearGaugeAnnotationFont - Font properties for annotations
FontFamily(string): Font familyFontSize(string): Font sizeColor(string): Text colorFontWeight(string): Font weightOpacity(double): Text opacity
Gradient Configuration
LinearGaugeLinearGradient - Linear gradient for gauge elements
StartValue(double): Start position of gradientEndValue(double): End position of gradientColorStops(ColorStops): Collection of color stops
LinearGaugeRadialGradient - Radial gradient for gauge elements
Radius(string): Radius of radial gradientInnerPosition(InnerPosition): Inner circle positionOuterPosition(OuterPosition): Outer circle positionColorStops(ColorStops): Collection of color stops
ColorStop / ColorStops - Gradient color definitions
Offset(string): Position in gradient (e.g., "0%", "100%")Color(string): Color at this positionOpacity(double): Opacity at this position
Container & Border Styling
LinearGaugeContainer - Outer container for the gauge
Type(ContainerType): Container type (Normal,RoundedRectangle,Thermometer)Offset(double): Offset from the axisWidth(double): Width of containerBackgroundColor(string): Background colorBorder(LinearGaugeContainerBorder): Border styling
LinearGaugeContainerBorder - Container border properties
Color(string): Border colorWidth(double): Border width
LinearGaugeBorder / LinearGaugeBorderSettings - Gauge border properties
Color(string): Border colorWidth(double): Border width
LinearGaugeMargin / LinearGaugeMarginSettings - Margin configuration
Left(double): Left marginRight(double): Right marginTop(double): Top marginBottom(double): Bottom margin
Tooltip Configuration
LinearGaugeTooltipSettings - Pointer tooltip configuration
Enable(bool): Enable or disable tooltipsFormat(string): Tooltip text formatPosition(TooltipPosition): Tooltip position (Top,Bottom,Left,Right)Fill(string): Tooltip background colorOpacity(double): Tooltip opacityShowAtMousePosition(bool): Show at cursor instead of pointerTextStyle(LinearGaugeTooltipTextStyle): Text stylingBorder(LinearGaugeTooltipBorder): Border styling
LinearGaugeRangeTooltipSettings - Range hover tooltip configuration
- Similar properties to tooltip settings for range hovers
LinearGaugeTooltipTextStyle - Tooltip text styling
FontFamily(string),FontSize(string),Color(string),FontWeight(string),Opacity(double)
Events & Event Arguments
LinearGaugeEvents - Event handler component
@using Syncfusion.Blazor.LinearGauge
<LinearGaugeEvents
Load="OnLoad"
Loaded="OnLoaded"
AxisLabelRendering="OnAxisLabelRendering"
AnnotationRendering="OnAnnotationRendering"
ValueChange="OnValueChange"
TooltipRendering="OnTooltipRendering"
DragStart="OnDragStart"
DragMove="OnDragMove"
DragEnd="OnDragEnd"
AnimationComplete="OnAnimationComplete"
ResizeCompleted="OnResizeCompleted"
Print="OnPrint">
</LinearGaugeEvents>
Event Types and Arguments:
| Event | Argument Type | Description |
|---|---|---|
Load |
LoadEventArgs |
Fires before gauge renders; can cancel with args.Cancel = true |
Loaded |
LoadedEventArgs |
Fires after gauge is successfully rendered |
AxisLabelRendering |
AxisLabelRenderEventArgs |
Fires before each axis label is rendered; modify args.Text to customize |
AnnotationRendering |
AnnotationRenderEventArgs |
Fires before annotation is rendered; modify args.Content to customize |
ValueChange |
ValueChangeEventArgs |
Fires when pointer value changes (user drag or programmatic); provides Value, PointerIndex, AxisIndex |
TooltipRendering |
TooltipRenderEventArgs |
Fires before tooltip displays; customize args.Content |
DragStart |
PointerDragEventArgs |
Fires when user starts dragging pointer; provides CurrentValue, PointerIndex, AxisIndex |
DragMove |
PointerDragEventArgs |
Fires continuously during pointer drag; provides current value |
DragEnd |
PointerDragEventArgs |
Fires when user releases pointer after drag |
AnimationComplete |
AnimationCompleteEventArgs |
Fires when pointer animation completes |
ResizeCompleted |
ResizeEventArgs |
Fires after gauge is resized; provides CurrentSize, PreviousSize |
OnGaugeMouseDown |
MouseEventArgs |
Fires on mouse down on gauge |
OnGaugeMouseLeave |
MouseEventArgs |
Fires when mouse leaves gauge |
OnGaugeMouseUp |
MouseEventArgs |
Fires on mouse up on gauge |
Print |
PrintEventArgs |
Fires before printing |
Enums
Orientation - Gauge layout direction
Orientation.Horizontal // Horizontal scale
Orientation.Vertical // Vertical scale
Position - Element positioning relative to axis
Position.Inside // Inside the axis
Position.Outside // Outside the axis
Position.Cross // Crossing the axis line
PointerType - Type of value indicator
PointerType.Marker // Shaped marker (circle, square, etc.)
PointerType.Bar // Bar/rectangle pointer
MarkerType - Shape of marker pointer
MarkerType.Circle
MarkerType.Rectangle
MarkerType.Triangle
MarkerType.Diamond
MarkerType.InvertedTriangle
Placement - Pointer position relative to axis
Placement.Center // Centered on axis
Placement.Near // Near side
Placement.Far // Far side
ContainerType - Container shape
ContainerType.Normal // Rectangular container
ContainerType.RoundedRectangle // Rounded rectangle
ContainerType.Thermometer // Thermometer shape
ExportType - Export format
ExportType.PNG // Export as PNG image
ExportType.SVG // Export as SVG image
ExportType.PDF // Export as PDF document
TooltipPosition - Tooltip placement
TooltipPosition.Top // Above the pointer
TooltipPosition.Bottom // Below the pointer
TooltipPosition.Left // Left of pointer
TooltipPosition.Right // Right of pointer
Theme - Predefined color themes
Theme.Bootstrap
Theme.Material
Theme.Fabric
Theme.Fluent
Theme.Tailwind
Theme.Bootstrap5
Theme.FluentDark
Theme.MaterialDark
Theme.BootstrapDark
Theme.TailwindDark
// ... and others
Primary Component Hierarchy
SfLinearGauge (root)
├── LinearGaugeTitleStyle
├── LinearGaugeMargin
├── LinearGaugeBorder
├── LinearGaugeContainer
│ └── LinearGaugeContainerBorder
├── LinearGaugeAxes
│ └── LinearGaugeAxis (repeatable)
│ ├── LinearGaugeLine
│ ├── LinearGaugeMajorTicks
│ ├── LinearGaugeMinorTicks
│ ├── LinearGaugeAxisLabelStyle
│ ├── LinearGaugeAxisLabelFont
│ ├── LinearGaugeContainer
│ ├── LinearGaugeLinearGradient
│ ├── LinearGaugeRadialGradient
│ ├── LinearGaugePointers
│ │ └── LinearGaugePointer (repeatable)
│ │ ├── LinearGaugePointerBorder
│ │ └── LinearGaugeMarkerTextStyle
│ └── LinearGaugeRanges
│ └── LinearGaugeRange (repeatable)
│ ├── LinearGaugeRangeBorder
│ └── LinearGaugeRangeTooltipSettings
├── LinearGaugeAnnotations
│ └── LinearGaugeAnnotation (repeatable)
│ └── LinearGaugeAnnotationFont
├── LinearGaugeTooltipSettings
│ ├── LinearGaugeTooltipTextStyle
│ └── LinearGaugeTooltipBorder
└── LinearGaugeEvents
├── Load handler
├── Loaded handler
├── AxisLabelRendering handler
├── AnnotationRendering handler
├── ValueChange handler
├── TooltipRendering handler
├── DragStart/Move/End handlers
├── AnimationComplete handler
└── ... more event handlers
Practical API Usage Notes
Async Methods: All component methods (
SetPointerValueAsync,SetAnnotationValueAsync,RefreshAsync,PrintAsync,ExportAsync) are asynchronous and must be awaited.Export Prerequisites: Ensure
AllowPdfExport="true",AllowImageExport="true", orAllowPrint="true"on the gauge before calling corresponding export or print methods.Animation: Set
AnimationDuration="0"for instant updates, or higher values for smooth animated transitions.Event Arguments: Event handler arguments are provided by the framework and contain context-specific information (e.g.,
ValueChangeEventArgscontains the new value).Index-Based Access: When using
SetPointerValueAsyncorSetAnnotationValueAsync, use zero-based indices for axes, pointers, and annotations.Performance: For frequent updates (e.g., every 100ms), consider batching updates or using
AnimationDuration="0"to avoid animation overhead.Accessibility: Use
Description,Title, and proper ARIA labels when the gauge needs to be accessible to screen readers.
Complete Component List
Component Classes (from Syncfusion.Blazor.LinearGauge namespace):
SfLinearGauge- Main componentLinearGaugeAnnotation- Annotation elementLinearGaugeAnnotationFont- Annotation font stylingLinearGaugeAnnotations- Annotation collectionLinearGaugeAxes- Axis collectionLinearGaugeAxis- Axis configurationLinearGaugeAxisLabelFont- Axis label fontLinearGaugeAxisLabelStyle- Axis label stylingLinearGaugeBorder- Gauge borderLinearGaugeBorderSettings- Border settingsLinearGaugeContainer- Container configurationLinearGaugeContainerBorder- Container borderLinearGaugeEvents- Event handlersLinearGaugeFontSettings- Font configurationLinearGaugeLine- Axis lineLinearGaugeLinearGradient- Linear gradientLinearGaugeMajorTicks- Major tick marksLinearGaugeMargin- Margin settingsLinearGaugeMarginSettings- Margin configurationLinearGaugeMarkerTextStyle- Marker text stylingLinearGaugeMinorTicks- Minor tick marksLinearGaugePointer- Pointer elementLinearGaugePointerBorder- Pointer borderLinearGaugePointers- Pointer collectionLinearGaugeRadialGradient- Radial gradientLinearGaugeRange- Range elementLinearGaugeRangeBorder- Range borderLinearGaugeRangeTooltipBorder- Range tooltip borderLinearGaugeRangeTooltipSettings- Range tooltipLinearGaugeRangeTooltipTextStyle- Range tooltip textLinearGaugeRanges- Range collectionLinearGaugeTickSettings- Tick configurationLinearGaugeTitleStyle- Title stylingLinearGaugeTooltipBorder- Tooltip borderLinearGaugeTooltipSettings- Tooltip configurationLinearGaugeTooltipTextStyle- Tooltip text stylingLinearGradient- Linear gradient definitionRadialGradient- Radial gradient definitionColorStop- Gradient color stopColorStops- Gradient color stops collectionPoint- Pointer type enumGradientPosition- Gradient positionInnerPosition- Inner gradient positionOuterPosition- Outer gradient position
Event Argument Classes:
LoadEventArgsLoadedEventArgsAxisLabelRenderEventArgsAnnotationRenderEventArgsValueChangeEventArgsTooltipRenderEventArgsPointerDragEventArgsResizeEventArgsMouseEventArgsPrintEventArgsAnimationCompleteEventArgs
Enum Types:
Orientation- Horizontal or VerticalPosition- Inside, Outside, CrossPointerType- Marker or BarMarkerType- Circle, Rectangle, Triangle, Diamond, InvertedTrianglePlacement- Center, Near, FarContainerType- Normal, RoundedRectangle, ThermometerExportType- PNG, SVG, PDFTooltipPosition- Top, Bottom, Left, RightTheme- Various theme optionsAlignment- Near, Center, FarPdfPageOrientation- Portrait, Landscape
Common Use Cases
1. Dashboard KPI Display
Display key performance indicators with color-coded ranges for quick status assessment. Use multiple gauges for different metrics.
2. Temperature Monitoring
Visualize temperature readings with appropriate ranges for different zones (freezing, normal, warning, critical).
3. Progress Tracking
Show task completion, project progress, or goal achievement using bar pointers on horizontal gauges.
4. Speedometer/Tachometer
Create vehicle dashboard components with styled pointers and ranges for speed or RPM display.
5. Sensor Data Visualization
Display real-time sensor readings (pressure, humidity, voltage) with dynamic pointer updates and threshold indicators.
6. Survey/Rating Display
Visualize survey results or ratings on a scale with markers showing average values and ranges for distribution.
7. Budget vs. Actual
Show financial metrics comparing budgeted vs. actual values using multiple pointers on the same axis.
8. Stock/Inventory Levels
Display inventory levels with color-coded ranges (critical, low, adequate, full) for quick status checks.
Tips for Implementation
When Starting
- Begin with getting-started.md for setup
- Add basic axis and pointer to verify functionality
- Gradually add ranges, styling, and interactivity
For Customization
- Use axes-configuration.md for scale customization
- Use pointers.md for pointer styling
- Use appearance-and-styling.md for overall look
For Interactivity
- Enable pointer dragging for user input
- Add tooltips for value display
- Use events for responding to user actions
- See user-interaction.md and methods-and-events.md
For Production
- Implement accessibility features from accessibility-and-internationalization.md
- Test with keyboard navigation
- Verify screen reader compatibility
- Configure proper ARIA labels
Next Steps
- New to Linear Gauge? Start with getting-started.md
- Need specific feature? Navigate to the relevant reference file based on your requirement
- Building dashboard? Combine multiple patterns and refer to appearance-and-styling.md
- Need interactivity? Check user-interaction.md and methods-and-events.md
All reference files are comprehensive and self-contained - you won't need to jump between multiple files for a single topic.