You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
1.8 KiB
HTML
93 lines
1.8 KiB
HTML
2 months ago
|
<!DOCTYPE HTML>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<title>Highcharts Example</title>
|
||
|
|
||
|
<script type="text/javascript" src="https://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
|
||
|
<style type="text/css">
|
||
|
#container {
|
||
|
min-width: 320px;
|
||
|
max-width: 600px;
|
||
|
margin: 0 auto;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<script src="https://cdn.hcharts.cn/highcharts/5.0.9/highcharts.js"></script>
|
||
|
<script src="https://cdn.hcharts.cn/highcharts/5.0.9/highcharts-more.js"></script>
|
||
|
<script src="https://cdn.hcharts.cn/highcharts/5.0.9/modules/exporting.js"></script>
|
||
|
|
||
|
<div id="container"></div>
|
||
|
<button id="plain">Plain</button>
|
||
|
<button id="inverted">Inverted</button>
|
||
|
<button id="polar">Polar</button>
|
||
|
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
var chart = Highcharts.chart('container', {
|
||
|
|
||
|
title: {
|
||
|
text: 'Chart.update'
|
||
|
},
|
||
|
|
||
|
subtitle: {
|
||
|
text: 'Plain'
|
||
|
},
|
||
|
|
||
|
xAxis: {
|
||
|
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
||
|
},
|
||
|
|
||
|
series: [{
|
||
|
type: 'column',
|
||
|
colorByPoint: true,
|
||
|
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
|
||
|
showInLegend: false
|
||
|
}]
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
$('#plain').click(function () {
|
||
|
chart.update({
|
||
|
chart: {
|
||
|
inverted: false,
|
||
|
polar: false
|
||
|
},
|
||
|
subtitle: {
|
||
|
text: 'Plain'
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
$('#inverted').click(function () {
|
||
|
chart.update({
|
||
|
chart: {
|
||
|
inverted: true,
|
||
|
polar: false
|
||
|
},
|
||
|
subtitle: {
|
||
|
text: 'Inverted'
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
$('#polar').click(function () {
|
||
|
chart.update({
|
||
|
chart: {
|
||
|
inverted: false,
|
||
|
polar: true
|
||
|
},
|
||
|
subtitle: {
|
||
|
text: 'Polar'
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|