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
| import * as echarts from "echarts";
| export default {
| /* grid: {
| x: 50,
| y: 40,
| x2: 80,
| y2: 80,
| containLabel: true,
| }, */
| xAxis: {
| type: "category",
| boundaryGap: true,
| data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
| axisTick: {
| //y轴刻度线
| show: false,
| },
| axisLine: {
| lineStyle: {
| color: "rbg(241, 241, 240)",
| width: 1, //这里是为了突出显示加上的
| },
| },
| },
| yAxis: {
| type: "value",
| axisTick: {
| //y轴刻度线
| show: false,
| },
| axisLine: {
| //y轴
| show: false,
| },
|
| axisLabel: {
| padding: [0, 10, 0, 0], // 四个数字分别为上右下左与原位置距离
| },
| splitLine: {
| //网格线
| lineStyle: {
| color: "rgb(230, 230, 230)",
| type: "dashed", //设置网格线类型 dotted:虚线 solid:实线
| },
| show: true, //隐藏或显示
| },
| },
| series: [
| {
| data: [22, 50, 18, 18, 32, 8, 22],
| type: "line",
| smooth: true,
| arWidth: 10,
| itemStyle: {
| normal: {
| color: "#2A3DE6",
| },
| },
| lineStyle: {
| color: "#213EB4",
| },
| areaStyle: {
| color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
| {
| offset: 0,
| color: "#1B3BEF", // 0% 处的颜色
| },
| {
| offset: 1,
| color: "#fff", // 100% 处的颜色
| },
| ]),
| },
| showSymbol: false,
| },
| ],
| tooltip: {
| show: true,
| trigger: "axis",
| },
| };
|
|