Six.html
2.9 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<html style="height: 100%;width: 100%;">
<head>
<script src="ue.js"></script>
<meta charset="utf-8">
</head>
<body style="height: 100%;width: 100%; margin: 0;font-size:1rem;line-height:150%;overflow-y: hidden;overflow-x:hidden;">
<div id="container" style="height: 100%;width: 100%;"></div>
<script type="text/javascript" src="jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="echarts.min.js"></script>
<script type="text/javascript" src="ajax.js"></script>
<script type="text/javascript">
var dom = document.getElementById("container");
var myChart = echarts.init(dom);
var app = {};
var option;
function eacharsassignment(s) {
console.log(s);
var name = s.name;
var dataX = s.dataX;
var dataY1 = s.dataY1;
var dataY2 = s.dataY2;
var option = {
tooltip: {
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
},
grid: {
top: '15%',
left: '0%',
right: '0%',
bottom: '0%',
containLabel: true,
},
xAxis: {
type: "category",
data: dataX,
axisLine: {
lineStyle: {
color: "white",
},
},
axisLabel: {
// interval: 0,
// rotate: 40,
textStyle: {
fontFamily: "Microsoft YaHei",
},
},
},
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "white",
},
},
splitLine: {
show: true,
lineStyle: {
color: "rgba(255,255,255,0.3)",
},
},
axisLabel: {},
},
series: [
{
name: name[0],
type: "bar",
barWidth: 8,
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(27, 255, 188, 1)",
},
{
offset: 1,
color: "rgba(27, 255, 188, 0.2)",
},
]),
borderColor: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(27, 255, 188, 0.5)",
},
{
offset: 1,
color: "rgba(27, 255, 188, 0.5)",
},
]),
barBorderRadius: 12,
},
},
data: dataY1,
},
],
};
if (option && typeof option === 'object') {
}
myChart.setOption(option);
};
ue.interface.setEchatsValue = function (s) {
eacharsassignment(s);
console.log(s);
}
</script>
</body>
</html>