Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<link href="http://cdn.kendostatic.com/2012.2.710/styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
<link href="http://cdn.kendostatic.com/2012.2.710/styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
<link href="http://cdn.kendostatic.com/2012.2.710/styles/kendo.dataviz.min.css" rel="stylesheet" type="text/css" />
<link href="http://cdn.kendostatic.com/2012.2.710/styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script src="http://cdn.kendostatic.com/2012.2.710/js/kendo.all.min.js"></script>
<meta charset=utf-8 />
<title>DataViz A11y With ARIA Role and Title</title>
</head>
<body>
  <figure>
    <div id="chart" role="img" title="Sources of Electricity Produced in Spain, 2008"></div>
    <figcaption>In 2008, Spain produced electricity for its residents in four ways. Chief among these was Nuclear power, which accounted for approximately 49% of production. Next were Wind and Hydro-electric power, which produced 27% and 22% of the nation's electricity, respectively. In a distant fourth was solor power, which accounted for only 2% of all electricity produced by the country.</figcaption>
  </figure>
</body>
</html>
 
figcaption {
  border: 5px solid #ddd;
  margin: 10px;
  padding: 15px;
  border-radius: 10px;
}
 
function createChart() {
    $("#chart").kendoChart({
      title: {
        text: "Sources of Electricity Produced in Spain, 2008"
      },
      legend: {
        position: "bottom",
        labels: {
          template: "#= text # (#= value #%)"
        }
      },
      seriesDefaults: {
        labels: {
          visible: true,
          position: "outsideEnd",
          format: "{0}%"
        }
      },
      series: [{
        type: "donut",
        data: [{
          category: "Hydro",
          value: 22
        }, {
          category: "Solar",
          value: 2
        }, {
          category: "Nuclear",
          value: 49
        }, {
          category: "Wind",
          value: 27
        }]
    }],
    tooltip: {
      visible: true,
      format: "{0}%"
    }
  });
}
createChart();
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
bsatrompro
0viewers