-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebview.html
More file actions
61 lines (56 loc) · 1.33 KB
/
webview.html
File metadata and controls
61 lines (56 loc) · 1.33 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>Document</title>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
</style>
<!-- 引入刚刚下载的 ECharts 文件 -->
<script src="./echarts/dist/echarts.js"></script>
</head>
<body>
<div id="main" style="width: 100vw;height:100vw;"></div>
<script>
var chartDom = document.getElementById('main');
var myChart = echarts.init(chartDom);
var option;
option = {
'color': ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'],
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
smooth: false,
symbolSize: 14,
symbol: 'circle',
itemStyle: {
color: (params)=>{
console.log(params);
return option.color[params.dataIndex];
}
},
lineStyle: {
color: "#aaa"
}
}
]
};
option && myChart.setOption(option);
</script>
</body>
</html>