Commit 974ee1162baf9d1ec5ec46c263e495edc840ae54
1 parent
9092f766
道闸
Showing
2 changed files
with
9 additions
and
16 deletions
src/components/allPieChart.vue
... | ... | @@ -4,8 +4,6 @@ |
4 | 4 | |
5 | 5 | <script> |
6 | 6 | import echarts from 'echarts' |
7 | - | |
8 | -require('echarts/theme/macarons') // echarts theme | |
9 | 7 | import {debounce} from '../utils/debounce' |
10 | 8 | |
11 | 9 | export default { |
... | ... | @@ -21,7 +19,7 @@ export default { |
21 | 19 | }, |
22 | 20 | height: { |
23 | 21 | type: String, |
24 | - default: '205px' | |
22 | + default: '100%' | |
25 | 23 | }, |
26 | 24 | autoResize: { |
27 | 25 | type: Boolean, |
... | ... | @@ -35,7 +33,6 @@ export default { |
35 | 33 | data() { |
36 | 34 | return { |
37 | 35 | chart: null, |
38 | - sidebarElm: null | |
39 | 36 | } |
40 | 37 | }, |
41 | 38 | watch: { |
... | ... | @@ -61,7 +58,6 @@ export default { |
61 | 58 | if (this.autoResize) { |
62 | 59 | window.removeEventListener('resize', this.__resizeHandler) |
63 | 60 | } |
64 | - | |
65 | 61 | this.chart.dispose() |
66 | 62 | this.chart = null |
67 | 63 | }, |
... | ... | @@ -109,8 +105,9 @@ export default { |
109 | 105 | { |
110 | 106 | name: '半径模式', |
111 | 107 | type: 'pie', |
112 | - radius: ['20%', '100%'], | |
108 | + radius: ['20%', '90%'], | |
113 | 109 | center: ['50%', '50%'], |
110 | + hoverAnimation:false, | |
114 | 111 | roseType: 'radius', |
115 | 112 | label: { |
116 | 113 | show: false |
... | ... | @@ -156,17 +153,14 @@ export default { |
156 | 153 | |
157 | 154 | ], |
158 | 155 | animationType: 'scale', |
159 | - animationEasing: 'elasticOut', | |
160 | - animationDelay: function(idx) { | |
161 | - return Math.random() * 200; | |
162 | - } | |
156 | + animationEasing: 'elasticOut' | |
163 | 157 | } |
164 | 158 | |
165 | 159 | ] |
166 | 160 | }) |
167 | 161 | }, |
168 | 162 | initChart() { |
169 | - this.chart = echarts.init(this.$el, 'macarons') | |
163 | + this.chart = echarts.init(this.$el) | |
170 | 164 | this.setOptions(this.chartData) |
171 | 165 | } |
172 | 166 | } | ... | ... |
src/components/barChart.vue
... | ... | @@ -32,8 +32,7 @@ export default { |
32 | 32 | }, |
33 | 33 | data() { |
34 | 34 | return { |
35 | - chart: null, | |
36 | - sidebarElm: null | |
35 | + chart: null | |
37 | 36 | } |
38 | 37 | }, |
39 | 38 | watch: { |
... | ... | @@ -116,9 +115,9 @@ export default { |
116 | 115 | top: 10, |
117 | 116 | containLabel: true |
118 | 117 | }, |
119 | - // tooltip: { | |
120 | - // | |
121 | - // }, | |
118 | + tooltip: { | |
119 | + | |
120 | + }, | |
122 | 121 | yAxis: { |
123 | 122 | axisLabel : { |
124 | 123 | formatter: '{value}', | ... | ... |