|
|
@@ -12,7 +12,7 @@
|
|
|
<script>
|
|
|
// import { getPie3D, getParametricEquation } from 'chart.js' // 工具类js,页面路径自己修改
|
|
|
import * as echarts from 'echarts'
|
|
|
-import { param } from '@/utils'
|
|
|
+import {param} from '@/utils'
|
|
|
|
|
|
export default {
|
|
|
name: 'Chart',
|
|
|
@@ -144,7 +144,7 @@ export default {
|
|
|
return offsetX + Math.cos(u) * (1 + Math.cos(v) * k) * hoverRate
|
|
|
},
|
|
|
|
|
|
- y: function(u, v) {
|
|
|
+ y: function (u, v) {
|
|
|
if (u < startRadian) {
|
|
|
return offsetY + Math.sin(startRadian) * (1 + Math.cos(v) * k) * hoverRate
|
|
|
}
|
|
|
@@ -154,7 +154,7 @@ export default {
|
|
|
return offsetY + Math.sin(u) * (1 + Math.cos(v) * k) * hoverRate
|
|
|
},
|
|
|
|
|
|
- z: function(u, v) {
|
|
|
+ z: function (u, v) {
|
|
|
if (u < -Math.PI * 0.5) {
|
|
|
return Math.sin(u)
|
|
|
}
|
|
|
@@ -243,13 +243,13 @@ export default {
|
|
|
max: Math.PI,
|
|
|
step: Math.PI / 1.4
|
|
|
},
|
|
|
- x: function(u, v) {
|
|
|
+ x: function (u, v) {
|
|
|
return Math.sin(v) * Math.sin(u) + Math.sin(u)
|
|
|
},
|
|
|
- y: function(u, v) {
|
|
|
+ y: function (u, v) {
|
|
|
return Math.sin(v) * Math.cos(u) + Math.cos(u)
|
|
|
},
|
|
|
- z: function(u, v) {
|
|
|
+ z: function (u, v) {
|
|
|
return Math.cos(v) > 0 ? 0.1 : -0.1
|
|
|
}
|
|
|
}
|
|
|
@@ -369,30 +369,30 @@ export default {
|
|
|
type: 'pie',
|
|
|
hoverAnimation: false, // 悬停不放大
|
|
|
labelLine: {
|
|
|
- length: this.EchartfontSize(30),
|
|
|
- length2: this.EchartfontSize(20)
|
|
|
+ length: this.EchartfontSize(40),
|
|
|
+ length2: this.EchartfontSize(66),
|
|
|
+ lineStyle: {
|
|
|
+ width: this.EchartfontSize(2)
|
|
|
+ }
|
|
|
},
|
|
|
label: {
|
|
|
position: 'outside',
|
|
|
- textStyle: {
|
|
|
- color: '#ffffff',
|
|
|
- fontSize: this.EchartfontSize(13)
|
|
|
- },
|
|
|
+ padding: [0, -this.EchartfontSize(50)],
|
|
|
formatter: (params) => {
|
|
|
const arr = [
|
|
|
`{a|${params.name}}`,
|
|
|
- `{b|${params.value}}`
|
|
|
+ `{b|${params.value}\n\n}`
|
|
|
]
|
|
|
return arr.join(' ')
|
|
|
},
|
|
|
rich: {
|
|
|
a: {
|
|
|
color: '#ffffff',
|
|
|
- fontSize: this.EchartfontSize(13)
|
|
|
+ fontSize: this.EchartfontSize(14)
|
|
|
},
|
|
|
b: {
|
|
|
color: 'rgba(33,229,248)',
|
|
|
- fontSize: this.EchartfontSize(13),
|
|
|
+ fontSize: this.EchartfontSize(14),
|
|
|
verticalAlign: 'top',
|
|
|
align: 'center'
|
|
|
|