2025-06-16 18:28:08 +05:00

43 lines
1019 B
HTML
Executable File

<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<script>
window.onload = function() {
var chart = new CanvasJS.Chart("chartContainer", {
theme: "light2", // "light1", "light2", "dark1", "dark2"
exportEnabled: true,
animationEnabled: true,
title: {
text: "Desktop Browser Market Share in 2016"
},
data: [{
type: "pie",
startAngle: 25,
toolTipContent: "<b>{label}</b>: {y}%",
showInLegend: "true",
legendText: "{label}",
indexLabelFontSize: 16,
indexLabel: "{label} - {y}%",
dataPoints: [
{ y: 51.08, label: "Chrome" },
{ y: 27.34, label: "Internet Explorer" },
{ y: 10.62, label: "Firefox" },
{ y: 5.02, label: "Microsoft Edge" },
{ y: 4.07, label: "Safari" },
{ y: 1.22, label: "Opera" },
{ y: 0.44, label: "Others" }
]
}]
});
chart.render();
}
</script>
</head>
<body>
<div id="chartContainer" style="height: 370px; max-width: 920px; margin: 0px auto;"></div>
<script src="../../canvasjs.min.js"></script>
</body>
</html>