Commit d91b873fb96c99b1a585d2321c71e9becdfd9a5d
1 parent
95fc0103
收入信息
Showing
1 changed file
with
63 additions
and
18 deletions
src/components/base/barChart.vue
@@ -151,25 +151,70 @@ export default { | @@ -151,25 +151,70 @@ export default { | ||
151 | name: '条', | 151 | name: '条', |
152 | type: 'bar', | 152 | type: 'bar', |
153 | yAxisIndex: 0, | 153 | yAxisIndex: 0, |
154 | - data: [1000,200,300],//百分比 | 154 | + data: [1000,200,300], |
155 | + data:[ | ||
156 | + { | ||
157 | + value:1000, | ||
158 | + itemStyle: { | ||
159 | + normal: { | ||
160 | + color: { | ||
161 | + type: 'linear', | ||
162 | + x: 0, | ||
163 | + x1: 1, | ||
164 | + colorStops: [{ | ||
165 | + offset: 0, | ||
166 | + color: '#2772F4' | ||
167 | + }, { | ||
168 | + offset: 1, | ||
169 | + color: '#00CAFE' | ||
170 | + }] | ||
171 | + } | ||
172 | + }, | ||
173 | + } | ||
174 | + }, | ||
175 | + { | ||
176 | + value:200, | ||
177 | + itemStyle: { | ||
178 | + normal: { | ||
179 | + color: { | ||
180 | + type: 'linear', | ||
181 | + x: 0, | ||
182 | + x1: 1, | ||
183 | + colorStops: [{ | ||
184 | + offset: 0, | ||
185 | + color: '#02C202' | ||
186 | + }, { | ||
187 | + offset: 1, | ||
188 | + color: '#51EC51' | ||
189 | + }] | ||
190 | + } | ||
191 | + }, | ||
192 | + } | ||
193 | + }, | ||
194 | + { | ||
195 | + value:300, | ||
196 | + itemStyle: { | ||
197 | + normal: { | ||
198 | + color: { | ||
199 | + type: 'linear', | ||
200 | + x: 0, | ||
201 | + x1: 1, | ||
202 | + colorStops: [{ | ||
203 | + offset: 0, | ||
204 | + color: '#FD8811' | ||
205 | + }, { | ||
206 | + offset: 1, | ||
207 | + color: '#FFAB00' | ||
208 | + }] | ||
209 | + } | ||
210 | + }, | ||
211 | + } | ||
212 | + }, | ||
213 | + | ||
214 | + | ||
215 | + ], | ||
155 | barWidth: '40%', | 216 | barWidth: '40%', |
156 | - itemStyle: { | ||
157 | - normal: { | ||
158 | - barBorderRadius: 16, | ||
159 | - color: { | ||
160 | - type: 'linear', | ||
161 | - x: 0, | ||
162 | - x1: 1, | ||
163 | - colorStops: [{ | ||
164 | - offset: 0, | ||
165 | - color: '#02ddff' | ||
166 | - }, { | ||
167 | - offset: 1, | ||
168 | - color: '#00feff' | ||
169 | - }] | ||
170 | - } | ||
171 | - }, | ||
172 | - }, | 217 | + |
173 | label: { | 218 | label: { |
174 | normal: {show: false} | 219 | normal: {show: false} |
175 | }, | 220 | }, |