Your search did not match any results.

Ajax Request


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 option, and the Chart will do the rest.

Copy to CodePen
$(function(){ $("#chart").dxChart({ 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 } }); });
<!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> <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"></div> </div> </body> </html>
#chart { height: 440px; }