Your search did not match any results.
Charts

Pie

Documentation
This demo illustrates the PieChart widget that is often used when comparing the percentage values of different point arguments within a series.
www.nationmaster.com
Copy to Codepen
Apply
Reset
$(function(){ $("#pie").dxPieChart({ size: { width: 500 }, palette: "bright", dataSource: dataSource, series: [ { argumentField: "country", valueField: "area", label: { visible: true, connector: { visible: true, width: 1 } } } ], title: "Area of Countries", "export": { enabled: true }, onPointClick: function (e) { var point = e.target; toggleVisibility(point); }, onLegendClick: function (e) { var arg = e.target; toggleVisibility(this.getAllSeries()[0].getPointsByArg(arg)[0]); } }); function toggleVisibility(item) { if(item.isVisible()) { item.hide(); } else { item.show(); } } });
<!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/17.1.4/css/dx.spa.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/17.1.4/css/dx.common.css" /> <link rel="dx-theme" data-theme="generic.light" href="https://cdn3.devexpress.com/jslib/17.1.4/css/dx.light.css" /> <script src="https://cdn3.devexpress.com/jslib/17.1.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="pie"></div> </div> </body> </html>
#pie { height: 440px; } #pie * { margin: 0 auto; }
var dataSource = [{ country: "Russia", area: 12 }, { country: "Canada", area: 7 }, { country: "USA", area: 7 }, { country: "China", area: 7 }, { country: "Brazil", area: 6 }, { country: "Australia", area: 5 }, { country: "India", area: 2 }, { country: "Others", area: 55 }];