Your search did not match any results.
Charts

Stacked Bar

API Reference
This demo illustrates the use of the Stacked Bar series chart type. Unlike side-by-side bar charts, this series is able to present both the proportion and the total value for each data category using rectangular bars stacked on top of one another.
Copy to Codepen
Apply
Reset
$(function(){ $("#chart").dxChart({ dataSource: dataSource, commonSeriesSettings: { argumentField: "state", type: "stackedBar" }, series: [ { valueField: "young", name: "0-14" }, { valueField: "middle", name: "15-64" }, { valueField: "older", name: "65 and older" } ], legend: { verticalAlignment: "bottom", horizontalAlignment: "center", itemTextPosition: 'top' }, valueAxis: { title: { text: "millions" }, position: "right" }, title: "Male Age Structure", "export": { enabled: true }, tooltip: { enabled: true, location: "edge", customizeTooltip: function (arg) { return { text: arg.seriesName + " years: " + arg.valueText }; } } }); });
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <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=1.0" /> <script src="js/jquery-3.1.0.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/16.2.4/css/dx.spa.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/16.2.4/css/dx.common.css" /> <link rel="dx-theme" data-theme="generic.light" href="https://cdn3.devexpress.com/jslib/16.2.4/css/dx.light.css" /> <script src="https://cdn3.devexpress.com/jslib/16.2.4/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="chart"></div> </div> </body> </html>
#chart { height: 440px; width: 100%; }
var dataSource = [{ state: "Germany", young: 6.7, middle: 28.6, older: 5.1 }, { state: "Japan", young: 9.6, middle: 43.4, older: 9 }, { state: "Russia", young: 13.5, middle: 49, older: 5.8 }, { state: "USA", young: 30, middle: 90.3, older: 14.5 }];