DevExtreme v26.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Charts - Range Area

Range area series can be used to display value ranges corresponding to specified arguments. Data is displayed as a color filled space between the line that joins the beginning and the line that joins the end series points.

www.kaggle.com
Backend API
import React from 'react'; import Chart, { CommonSeriesSettings, Series, ArgumentAxis, ValueAxis, Label, VisualRange, Format, Export, Legend, } from 'devextreme-react/chart'; import { inflationData } from './data.ts'; function customizeLabelText({ valueText }: { valueText: string }): string { return `${valueText} %`; } function App() { return ( <Chart id="chart" dataSource={inflationData} palette="Violet" title="Annual Inflation Rate in 2024 and 2025" > <CommonSeriesSettings argumentField="date" type="rangearea" /> <Series rangeValue1Field="val2024" rangeValue2Field="val2025" name="2024 - 2025" /> <ArgumentAxis valueMarginsEnabled={false}> <Label format="month" /> </ArgumentAxis> <ValueAxis tickInterval={0.5} valueMarginsEnabled={false} > <VisualRange startValue={0.5} endValue={4} /> <Label customizeText={customizeLabelText}> <Format precision={2} type="fixedPoint" /> </Label> </ValueAxis> <Export enabled={true} /> <Legend visible={false} /> </Chart> ); } export default App;
import React from 'react'; import Chart, { CommonSeriesSettings, Series, ArgumentAxis, ValueAxis, Label, VisualRange, Format, Export, Legend, } from 'devextreme-react/chart'; import { inflationData } from './data.js'; function customizeLabelText({ valueText }) { return `${valueText} %`; } function App() { return ( <Chart id="chart" dataSource={inflationData} palette="Violet" title="Annual Inflation Rate in 2024 and 2025" > <CommonSeriesSettings argumentField="date" type="rangearea" /> <Series rangeValue1Field="val2024" rangeValue2Field="val2025" name="2024 - 2025" /> <ArgumentAxis valueMarginsEnabled={false}> <Label format="month" /> </ArgumentAxis> <ValueAxis tickInterval={0.5} valueMarginsEnabled={false} > <VisualRange startValue={0.5} endValue={4} /> <Label customizeText={customizeLabelText}> <Format precision={2} type="fixedPoint" /> </Label> </ValueAxis> <Export enabled={true} /> <Legend visible={false} /> </Chart> ); } export default App;
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App.tsx'; ReactDOM.render( <App />, document.getElementById('app'), );
export const inflationData = [{ date: new Date(2024, 0, 1), val2024: 1.63, val2025: 2.63, }, { date: new Date(2024, 1, 1), val2024: 2.11, val2025: 2.14, }, { date: new Date(2024, 2, 1), val2024: 2.68, val2025: 2.31, }, { date: new Date(2024, 3, 1), val2024: 3.16, val2025: 2.24, }, { date: new Date(2024, 4, 1), val2024: 3.57, val2025: 2.02, }, { date: new Date(2024, 5, 1), val2024: 3.56, val2025: 1.05, }, { date: new Date(2024, 6, 1), val2024: 3.63, val2025: 1.24, }, { date: new Date(2024, 7, 1), val2024: 3.77, val2025: 1.15, }, { date: new Date(2024, 8, 1), val2024: 3.87, val2025: 1.14, }, { date: new Date(2024, 9, 1), val2024: 3.53, val2025: 1.17, }, { date: new Date(2024, 10, 1), val2024: 3.39, val2025: 1.14, }, { date: new Date(2024, 11, 1), val2024: 2.96, val2025: 1.50, }];
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App.js'; ReactDOM.render(<App />, document.getElementById('app'));
export const inflationData = [ { date: new Date(2024, 0, 1), val2024: 1.63, val2025: 2.63, }, { date: new Date(2024, 1, 1), val2024: 2.11, val2025: 2.14, }, { date: new Date(2024, 2, 1), val2024: 2.68, val2025: 2.31, }, { date: new Date(2024, 3, 1), val2024: 3.16, val2025: 2.24, }, { date: new Date(2024, 4, 1), val2024: 3.57, val2025: 2.02, }, { date: new Date(2024, 5, 1), val2024: 3.56, val2025: 1.05, }, { date: new Date(2024, 6, 1), val2024: 3.63, val2025: 1.24, }, { date: new Date(2024, 7, 1), val2024: 3.77, val2025: 1.15, }, { date: new Date(2024, 8, 1), val2024: 3.87, val2025: 1.14, }, { date: new Date(2024, 9, 1), val2024: 3.53, val2025: 1.17, }, { date: new Date(2024, 10, 1), val2024: 3.39, val2025: 1.14, }, { date: new Date(2024, 11, 1), val2024: 2.96, val2025: 1.5, }, ];
<!DOCTYPE html> <html lang="en"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/26.1.5/css/dx.light.css" /> <link rel="stylesheet" type="text/css" href="./bundle.css" /> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="app"></div> </div> <script src="bundles/vendor/react.vendor.js"></script> <script src="./bundle.js"></script> </body> </html>
#chart { height: 440px; }