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 - Pyramid Chart

DevExtreme Funnel can display data/information as a pyramid chart. To generate pyramid visualizations, set the algorithm property to "dynamicHeight" and invert the Funnel.

Backend API
import React from 'react'; import Funnel, { Title, Margin, Tooltip, Item, Border, Legend, Label, Font, } from 'devextreme-react/funnel'; import { dataSource } from './data.ts'; function App() { return ( <Funnel id="pyramid" dataSource={dataSource} sortData={false} inverted={true} algorithm="dynamicHeight" palette="Harmony Light" argumentField="level" valueField="count" > <Title text="Team Composition"> <Margin bottom={30} /> </Title> <Tooltip enabled={true} /> <Item> <Border visible={true} /> </Item> <Legend visible={true} /> <Label visible={true} horizontalAlignment="left" backgroundColor="none" > <Font size={16} /> </Label> </Funnel> ); } export default App;
import React from 'react'; import Funnel, { Title, Margin, Tooltip, Item, Border, Legend, Label, Font, } from 'devextreme-react/funnel'; import { dataSource } from './data.js'; function App() { return ( <Funnel id="pyramid" dataSource={dataSource} sortData={false} inverted={true} algorithm="dynamicHeight" palette="Harmony Light" argumentField="level" valueField="count" > <Title text="Team Composition"> <Margin bottom={30} /> </Title> <Tooltip enabled={true} /> <Item> <Border visible={true} /> </Item> <Legend visible={true} /> <Label visible={true} horizontalAlignment="left" backgroundColor="none" > <Font size={16} /> </Label> </Funnel> ); } 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 dataSource = [ { count: 75, level: 'Junior Engineer' }, { count: 95, level: 'Mid-Level Engineer' }, { count: 53, level: 'Senior Engineer' }, { count: 23, level: 'Lead Engineer' }, { count: 18, level: 'Architect' }, ];
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App.js'; ReactDOM.render(<App />, document.getElementById('app'));
export const dataSource = [ { count: 75, level: 'Junior Engineer' }, { count: 95, level: 'Mid-Level Engineer' }, { count: 53, level: 'Senior Engineer' }, { count: 23, level: 'Lead Engineer' }, { count: 18, level: 'Architect' }, ];
<!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>
#pyramid { height: 440px; }

This demo configures the following objects:

  • title
    Specifies component title.
  • tooltip
    Specifies item tooltips.
  • item
    Customizes item appearance.
  • legend
    Configures the component legend.
  • label
    Configures item labels.