test.html
2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<html>
<head>
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/css?family=Lobster+Two:700i" rel="stylesheet">
<script src='../dist/echarts.js'></script>
<script src='../dist/echarts-liquidfill.js'></script>
</head>
<body>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
background: #F1F7FF;
}
#main {
padding: 20px;
}
h1 {
margin: 20px;
font-size: 20px;
font-weight: bold;
text-align: center;
color: #D94854;
}
.chart {
width: 30%;
margin: 20px auto;
height: 300px;
border: 1px solid #D94854;
}
p {
text-align: center;
}
</style>
<h1>ECharts LiquidFill Example</h1>
<p>This is an example showing liquidFill chart that fills the container.</p>
<div id='main'>
<div class="chart" id="chart"></div>
</div>
<script>
var options = {
series: [{
type: 'liquidFill',
waveAnimation: false,
animation: false,
data: [{
value: 0.7
}]
}]
};
var chart = echarts.init(document.getElementById('chart'));
chart.setOption(options);
window.onresize = function () {
chart.resize();
};
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement('script');
hm.src = '//hm.baidu.com/hm.js?4bad1df23f079e0d12bdbef5e65b072f';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>