DevExtreme v24.1 is now available.

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

Your search did not match any results.

JavaScript/jQuery Charts - Pyramid Chart

The DevExtreme JavaScript Pyramid Chart is often used to visualize an organizational structure. In this demo, the pyramid displays a team’s composition, reflecting both subordination and strength. In code, the pyramid is created using the Funnel component with the algorithm property set to «dynamicHeight» and inverted property set to true.

Backend API
$(() => { $('#pyramid').dxFunnel({ dataSource, valueField: 'count', argumentField: 'level', title: { text: 'Team Composition', margin: { bottom: 30, }, }, tooltip: { enabled: true, }, inverted: true, algorithm: 'dynamicHeight', item: { border: { visible: true, }, }, legend: { visible: true, }, label: { visible: true, backgroundColor: 'none', horizontalAlignment: 'left', font: { size: 16, }, }, palette: 'Harmony light', sortData: false, }); });
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" 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" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/24.1.7/css/dx.light.css" /> <script src="js/dx.all.js"></script> <script src="data.js"></script> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="pyramid"></div> </div> </body> </html>
#pyramid { height: 440px; }
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', }];