77 lines
1.7 KiB
HTML
77 lines
1.7 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Highcharts Example</title>
|
|
|
|
<style type="text/css">
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
|
|
<script src="../../code/highcharts.js"></script>
|
|
<script src="../../code/modules/exporting.js"></script>
|
|
<script src="../../code/modules/export-data.js"></script>
|
|
|
|
<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
// Build the chart
|
|
Highcharts.chart('container', {
|
|
chart: {
|
|
plotBackgroundColor: null,
|
|
plotBorderWidth: null,
|
|
plotShadow: false,
|
|
type: 'pie'
|
|
},
|
|
title: {
|
|
text: 'Browser market shares in January, 2018'
|
|
},
|
|
tooltip: {
|
|
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
|
|
},
|
|
plotOptions: {
|
|
pie: {
|
|
allowPointSelect: true,
|
|
cursor: 'pointer',
|
|
dataLabels: {
|
|
enabled: false
|
|
},
|
|
showInLegend: true
|
|
}
|
|
},
|
|
series: [{
|
|
name: 'Brands',
|
|
colorByPoint: true,
|
|
data: [{
|
|
name: 'Chrome',
|
|
y: 61.41,
|
|
sliced: true,
|
|
selected: true
|
|
}, {
|
|
name: 'Internet Explorer',
|
|
y: 11.84
|
|
}, {
|
|
name: 'Firefox',
|
|
y: 10.85
|
|
}, {
|
|
name: 'Edge',
|
|
y: 4.67
|
|
}, {
|
|
name: 'Safari',
|
|
y: 4.18
|
|
}, {
|
|
name: 'Other',
|
|
y: 7.05
|
|
}]
|
|
}]
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|