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
| barTemplate1 = {
| title:{
| text:"输入标题",
| textStyle:{
| color:'#fff',
| fontStyle:'normal',
| fontWeight:'bold',
| fontFamily:'sans-serif',
| fontSize:12
| }
| },
| grid: {
| top:20,
| left:0,
| bottom:0,
| right:30,
| containLabel: true
| },
| textStyle:{
| fontFamily: "Microsoft YaHei",
| fontSize: 9,
| fontStyle: "normal",
| fontWeight: "normal",
| color: '#fff'
| },
| tooltip: {
| trigger: 'axis',
| axisPointer: {
| type: 'none',
| textStyle: {
| color: '#fff',
| fontSize:9
| },
| },
| formatter: function(params) {
| return params[0].name + '<br/>' +
| "<span style='display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:rgba(36,207,233,0.9)'></span>" +
| params[0].seriesName + ' : ' + params[0].value.toLocaleString() + '个<br/>'
| }
| },
| xAxis: {
| show: false,
| type: 'value',
| },
| yAxis: [{
| type: 'category',
| inverse: true,
| axisLabel: {
| show: true,
| color: '#fff',
| fontSize: 9
| },
| splitLine: {
| show: false
| },
| axisTick: {
| show: false
| },
| axisLine: {
| show: false
| },
| data: ['类别1', '类别2', '类别3', '类别4', '类别5']
| }, {
| type: 'category',
| inverse: true,
| axisTick: 'none',
| axisLine: 'none',
| show: true,
| axisLabel: {
| color: '#ffffff',
| fontSize: 9,
| formatter:function(value) {
| return value.toLocaleString()+ '个';
| },
| },
| data: [1,2,3, 4, 5]
| }],
| series: [{
| name: '值',
| type: 'bar',
| zlevel: 1,
| itemStyle: {
| normal: {
| barBorderRadius: 30,
| color:'rgb(46,200,207)'
| }
| // normal: {
| // barBorderRadius: 30,
| // color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
| // offset: 0,
| // color: 'rgb(57,89,255,1)'
| // }, {
| // offset: 1,
| // color: 'rgb(46,200,207,1)'
| // }]),
| // },
| },
| barWidth: 5,
| data: [1,2,3, 4, 5]
| },
| {
| type: 'bar',
| barWidth: 5,
| barGap: '-100%',
| data: [5,5,5,5, 5],
| itemStyle: {
| normal: {
| color: 'rgba(24,31,68,1)',
| barBorderRadius: 30,
| }
| },
| },
| ]
| };
| barTemplate1Series=[{
| name: '',
| type: 'bar',
| zlevel: 1,
| itemStyle: {
| normal: {
| color:'rgb(46,200,207)',
| barBorderRadius: 30,
| }
| },
| barWidth: 5,
| data: []
| },
| {
| type: 'bar',
| barWidth: 5,
| barGap: '-100%',
| data: [5,5,5,5, 5],
| itemStyle: {
| normal: {
| color: 'rgba(24,31,68)',
| barBorderRadius: 30,
| }
| },
| },
| ]
|
|