(dom, data)
| 1048 | this.$refs.pyramidBody.style.zoom = this.$refs.pyramidBody.clientHeight / 520 / (this.$refs.pyramid.clientWidth / 720) |
| 1049 | }, |
| 1050 | getEchart(dom, data) { |
| 1051 | const sum = (Math.round((data.value / this.sum) * 10000) / 100).toFixed(1); |
| 1052 | const myChart = echarts.init(document.getElementById(dom), null, { renderer: 'canvas' }); |
| 1053 | const option = { |
| 1054 | color: [data.color, '#333'], |
| 1055 | series: [{ |
| 1056 | name: '访问来源', |
| 1057 | type: 'pie', |
| 1058 | radius: ['92%', '100%'], |
| 1059 | clockWise: false, |
| 1060 | avoidLabelOverlap: false, |
| 1061 | hoverAnimation: false, |
| 1062 | label: { |
| 1063 | normal: { |
| 1064 | show: true, |
| 1065 | position: 'center', |
| 1066 | textStyle: { |
| 1067 | fontSize: 14 |
| 1068 | }, |
| 1069 | formatter: '{c}%' |
| 1070 | } |
| 1071 | }, |
| 1072 | labelLine: { |
| 1073 | show: false |
| 1074 | }, |
| 1075 | data: [{ |
| 1076 | value: sum, |
| 1077 | name: '', |
| 1078 | label: { |
| 1079 | normal: { |
| 1080 | show: true |
| 1081 | } |
| 1082 | } |
| 1083 | }, |
| 1084 | { |
| 1085 | value: (100 - sum), |
| 1086 | name: '', |
| 1087 | label: { |
| 1088 | normal: { |
| 1089 | show: false |
| 1090 | } |
| 1091 | } |
| 1092 | } |
| 1093 | ] |
| 1094 | }] |
| 1095 | }; |
| 1096 | myChart.setOption(option); |
| 1097 | } |
| 1098 | }, |
| 1099 | template: ` |
| 1100 | <div class="wrap-container pyramid full" ref="pyramid"> |
nothing calls this directly
no outgoing calls
no test coverage detected