Your search did not match any results.



If your server stores data in JSON format, making AJAX requests is inevitable. But instead of configuring these requests manually, assign the URL of your data storage (in this demo, a JSON file) to the dataSource property, and the Chart will do the rest.

Copy to CodePen
window.onload = function() { var viewModel = { chartOptions: { rotated: true, dataSource: "../../../../data/simpleJSON.json", series: { label: { visible: true, backgroundColor: "#c18e92" }, color: "#79cac4", type: "bar", argumentField: "day", valueField: "sales" }, title: "Daily Sales", argumentAxis: { label: { customizeText: function() { return "Day " + this.valueText; } } }, valueAxis: { tick: { visible: false }, label: { visible: false } }, "export": { enabled: true }, legend: { visible: false } } }; ko.applyBindings(viewModel, document.getElementById("chart-demo")); };
<!DOCTYPE html> <html xmlns=""> <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=""></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script> <script src=""></script> <link rel="stylesheet" type="text/css" href="" /> <link rel="stylesheet" type="text/css" href="" /> <script src=""></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-demo"> <div id="chart" data-bind="dxChart: chartOptions"></div> </div> </div> </body> </html>
#chart { height: 440px; }