@@ -53,103 +53,102 @@ export default {
5353 data .push ((Math .sin (i / 5 ) * (i / 5 - 10 ) + i / 6 ) * 5 )
5454 data2 .push ((Math .sin (i / 5 ) * (i / 5 + 10 ) + i / 6 ) * 3 )
5555 }
56- this .chart .setOption (
57- {
58- backgroundColor: ' #08263a' ,
59- grid: {
60- left: ' 5%' ,
61- right: ' 5%'
56+ this .chart .setOption ({
57+ backgroundColor: ' #08263a' ,
58+ grid: {
59+ left: ' 5%' ,
60+ right: ' 5%'
61+ },
62+ xAxis: [{
63+ show: false ,
64+ data: xAxisData
65+ }, {
66+ show: false ,
67+ data: xAxisData
68+ }],
69+ visualMap: {
70+ show: false ,
71+ min: 0 ,
72+ max: 50 ,
73+ dimension: 0 ,
74+ inRange: {
75+ color: [' #4a657a' , ' #308e92' , ' #b1cfa5' , ' #f5d69f' , ' #f5898b' , ' #ef5055' ]
76+ }
77+ },
78+ yAxis: {
79+ axisLine: {
80+ show: false
6281 },
63- xAxis: [{
64- show: false ,
65- data: xAxisData
66- }, {
67- show: false ,
68- data: xAxisData
69- }],
70- visualMap: {
71- show: false ,
72- min: 0 ,
73- max: 50 ,
74- dimension: 0 ,
75- inRange: {
76- color: [' #4a657a' , ' #308e92' , ' #b1cfa5' , ' #f5d69f' , ' #f5898b' , ' #ef5055' ]
82+ axisLabel: {
83+ textStyle: {
84+ color: ' #4a657a'
7785 }
7886 },
79- yAxis: {
80- axisLine: {
81- show: false
82- },
83- axisLabel: {
84- textStyle: {
85- color: ' #4a657a'
86- }
87- },
88- splitLine: {
89- show: true ,
90- lineStyle: {
91- color: ' #08263f'
92- }
93- },
94- axisTick: {
95- show: false
87+ splitLine: {
88+ show: true ,
89+ lineStyle: {
90+ color: ' #08263f'
9691 }
9792 },
98- series: [{
99- name: ' back' ,
100- type: ' bar' ,
101- data: data2,
102- z: 1 ,
103- itemStyle: {
104- normal: {
105- opacity: 0.4 ,
106- barBorderRadius: 5 ,
107- shadowBlur: 3 ,
108- shadowColor: ' #111'
109- }
110- }
111- }, {
112- name: ' Simulate Shadow' ,
113- type: ' line' ,
114- data,
115- z: 2 ,
116- showSymbol: false ,
117- animationDelay: 0 ,
118- animationEasing: ' linear' ,
119- animationDuration: 1200 ,
120- lineStyle: {
121- normal: {
122- color: ' transparent'
123- }
124- },
125- areaStyle: {
126- normal: {
127- color: ' #08263a' ,
128- shadowBlur: 50 ,
129- shadowColor: ' #000'
130- }
93+ axisTick: {
94+ show: false
95+ }
96+ },
97+ series: [{
98+ name: ' back' ,
99+ type: ' bar' ,
100+ data: data2,
101+ z: 1 ,
102+ itemStyle: {
103+ normal: {
104+ opacity: 0.4 ,
105+ barBorderRadius: 5 ,
106+ shadowBlur: 3 ,
107+ shadowColor: ' #111'
131108 }
132- }, {
133- name: ' front' ,
134- type: ' bar' ,
135- data,
136- xAxisIndex: 1 ,
137- z: 3 ,
138- itemStyle: {
139- normal: {
140- barBorderRadius: 5
141- }
109+ }
110+ }, {
111+ name: ' Simulate Shadow' ,
112+ type: ' line' ,
113+ data,
114+ z: 2 ,
115+ showSymbol: false ,
116+ animationDelay: 0 ,
117+ animationEasing: ' linear' ,
118+ animationDuration: 1200 ,
119+ lineStyle: {
120+ normal: {
121+ color: ' transparent'
142122 }
143- }],
144- animationEasing: ' elasticOut' ,
145- animationEasingUpdate: ' elasticOut' ,
146- animationDelay (idx ) {
147- return idx * 20
148123 },
149- animationDelayUpdate (idx ) {
150- return idx * 20
124+ areaStyle: {
125+ normal: {
126+ color: ' #08263a' ,
127+ shadowBlur: 50 ,
128+ shadowColor: ' #000'
129+ }
130+ }
131+ }, {
132+ name: ' front' ,
133+ type: ' bar' ,
134+ data,
135+ xAxisIndex: 1 ,
136+ z: 3 ,
137+ itemStyle: {
138+ normal: {
139+ barBorderRadius: 5
140+ }
151141 }
152- })
142+ }],
143+ animationEasing: ' elasticOut' ,
144+ animationEasingUpdate: ' elasticOut' ,
145+ animationDelay (idx ) {
146+ return idx * 20
147+ },
148+ animationDelayUpdate (idx ) {
149+ return idx * 20
150+ }
151+ })
153152 }
154153 }
155154}
0 commit comments