47 lines
1.0 KiB
HTML
47 lines
1.0 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
|
|
<head>
|
|
<script type="text/javascript">
|
|
window.onload = function () {
|
|
var chart = new CanvasJS.Chart("chartContainer", {
|
|
title: {
|
|
text: "Mobile / Tablet OS Market Share, Jun 2015"
|
|
},
|
|
animationEnabled: true,
|
|
theme: "theme2",
|
|
data: [
|
|
{
|
|
type: "doughnut",
|
|
indexLabelFontFamily: "Garamond",
|
|
indexLabelFontSize: 20,
|
|
startAngle: 0,
|
|
indexLabelFontColor: "dimgrey",
|
|
indexLabelLineColor: "darkgrey",
|
|
toolTipContent: "{y} %",
|
|
|
|
dataPoints: [
|
|
{ y: 51.04, indexLabel: "Android {y}%" },
|
|
{ y: 40.83, indexLabel: "iOS {y}%" },
|
|
{ y: 3.20, indexLabel: "Java ME {y}%" },
|
|
{ y: 1.11, indexLabel: "BlackBerry {y}%" },
|
|
{ y: 2.29, indexLabel: "Windows {y}%" },
|
|
{ y: 1.53, indexLabel: "Others {y}%" }
|
|
|
|
]
|
|
}
|
|
]
|
|
});
|
|
|
|
chart.render();
|
|
}
|
|
</script>
|
|
<script src="../../canvasjs.min.js"></script>
|
|
<title>CanvasJS Example</title>
|
|
</head>
|
|
<body>
|
|
<div id="chartContainer" style="height: 400px; width: 100%;">
|
|
</div>
|
|
</body>
|
|
</html>
|