Pull down to refresh...
Release to refresh...
Refreshing...
-
Data Grid
- Overview
-
Data Binding
-
Paging and Scrolling
-
Editing
-
Grouping
-
Filtering and Sorting
- Focused Row
-
Row Drag & Drop
-
Selection
-
Columns
- State Persistence
-
Appearance
-
Templates
-
Data Summaries
-
Master-Detail
-
Export to PDF
-
Export to Excel
-
Adaptability
- Keyboard Navigation
-
Pivot Grid
- Overview
-
Data Binding
-
Field Chooser
-
Features
-
Export to Excel
-
Tree List
- Overview
-
Data Binding
- Sorting
- Paging
-
Editing
- Node Drag & Drop
- Focused Row
-
Selection
-
Filtering
-
Column Customization
- State Persistence
- Adaptability
- Keyboard Navigation
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Features
- Virtual Scrolling
-
Grouping
-
Customization
- Adaptability
-
Html Editor
-
Chat
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
Charts
- Overview
-
Data Binding
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Line Charts
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
-
Sparkline Charts
-
Tree Map
-
Funnel and Pyramid Charts
- Sankey Chart
-
Combinations
-
More Features
-
Export
-
Selection
-
Tooltips
-
Zooming
-
-
Gantt
- Overview
-
Data
-
UI Customization
- Strip Lines
- Export to PDF
- Sorting
-
Filtering
-
Gauges
- Overview
-
Data Binding
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Navigation
- Overview
- Accordion
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
- Pagination
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
- Box
- Responsive Box
- Resizable
-
-
Editors
- Overview
- Autocomplete
-
Calendar
- Check Box
- Color Box
-
Date Box
-
Date Range Box
-
Drop Down Box
-
Number Box
-
Select Box
- Switch
-
Tag Box
- Text Area
- Text Box
- Validation
- Custom Text Editor Buttons
- Right-to-Left Support
- Editor Appearance Variants
-
Forms and Multi-Purpose
- Overview
- Button Group
- Field Set
-
Filter Builder
-
Form
- Radio Group
-
Range Selector
- Numeric Scale (Lightweight)
- Numeric Scale
- Date-Time Scale (Lightweight)
- Date-Time Scale
- Logarithmic Scale
- Discrete scale
- Custom Formatting
- Use Range Selection for Calculation
- Use Range Selection for Filtering
- Image on Background
- Chart on Background
- Customized Chart on Background
- Chart on Background with Series Template
- Range Slider
- Slider
-
Sortable
-
File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Actions and Lists
- Overview
-
Action Sheet
-
Button
- Floating Action Button
- Drop Down Button
-
Context Menu
-
List
-
Lookup
-
Maps
- Overview
-
Map
-
Vector Map
-
Dialogs and Notifications
-
Localization
Related Demos:
Your search did not match any results.
Loading...
React Gauges - Title and Center Label Customization
This demo shows how to specify a CircularGauge title and display custom labels in the component's center.
A CircularGauge title describes gauge data. To customize it, use the properties of the title configuration object:
-
Location
Use the horizontalAlignment and verticalAlignment properties to place a title on any side of your gauge. -
Font Settings
Use the font configuration object.
You can display a custom label in the center of a CircularGauge. Use the centerComponent or centerRender properties, and render template content as an SVG element.
Was this demo helpful?
Feel free to share demo-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Backend API
x
import React from 'react';
import {
CircularGauge, Scale, Title, Font, Margin, MinorTick,
Export, RangeContainer, ValueIndicator,
} from 'devextreme-react/circular-gauge';
function CenterTemplate(gauge) {
return (
<svg>
<rect y="0" x="0" width="200" height="200" fill="transparent"></rect>
<g transform="translate(50 0)">
<rect x="0" y="0" width="100" height="70" rx="8" fill="#f2f2f2"></rect>
<text textAnchor="middle" y="27" x="50" fill="#000" fontSize="20">
<tspan x="50">{gauge.value()}</tspan>
<tspan x="50" dy="30">kg</tspan>
</text>
</g>
<g transform="translate(43 140)">
<rect className="description" x="0" y="0" width="114" height="56" rx="8" fill="#fff"></rect>
<text textAnchor="start" y="23" x="15" fill="#000" fontSize="12">
<tspan x="15">Capacity: 10 kg</tspan>
<tspan x="15" dy="20">Graduation: 10 g</tspan>
</text>
</g>
</svg>
);
}
function App() {
return (
<CircularGauge
id="gauge"
value={7.78}
centerRender={CenterTemplate}
>
<Scale startValue={0} endValue={10} tickInterval={1}>
<MinorTick visible />
</Scale>
<Export enabled />
<RangeContainer backgroundColor="#03a9f4" />
<ValueIndicator color="#03a9f4" />
<Title text="Gold Production (in Kilograms)" verticalAlignment="bottom">
<Font size={25} />
<Margin top={25} />
</Title>
</CircularGauge>
);
}
export default App;
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx