|
|
@@ -13,7 +13,7 @@
|
|
|
// import { getPie3D, getParametricEquation } from 'chart.js' // 工具类js,页面路径自己修改
|
|
|
import * as echarts from 'echarts'
|
|
|
import {param} from '@/utils'
|
|
|
-import {chartJxdxqky, chartSyjhdxqk} from "@/api/dashboard-json";
|
|
|
+import {chartJxdxqky, chartSyjhdxqk} from '@/api/dashboard-json'
|
|
|
|
|
|
export default {
|
|
|
name: 'Jxdxqk',
|
|
|
@@ -37,7 +37,7 @@ export default {
|
|
|
res.info.series[0].data[0],
|
|
|
res.info.series[1].data[0]
|
|
|
]
|
|
|
- this.arrMap = arrMap;
|
|
|
+ this.arrMap = arrMap
|
|
|
}
|
|
|
|
|
|
/** ***********************
|
|
|
@@ -155,7 +155,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
|
|
|
}
|
|
|
@@ -165,7 +165,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)
|
|
|
}
|
|
|
@@ -254,13 +254,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
|
|
|
}
|
|
|
}
|
|
|
@@ -377,50 +377,50 @@ export default {
|
|
|
|
|
|
this.option.series.push(
|
|
|
{
|
|
|
- name: '', // 自己根据场景修改
|
|
|
- type: 'pie',
|
|
|
- hoverAnimation: false, // 悬停不放大
|
|
|
- labelLine: {
|
|
|
- length: this.EchartfontSize(30),
|
|
|
- length2: this.EchartfontSize(60),
|
|
|
- lineStyle: {
|
|
|
- width: this.EchartfontSize(2)
|
|
|
- }
|
|
|
- },
|
|
|
- label: {
|
|
|
- position: 'outside',
|
|
|
- padding: [0, -this.EchartfontSize(50)],
|
|
|
- formatter: (params) => {
|
|
|
- const arr = [
|
|
|
- `{a|${params.name}}`,
|
|
|
- `{b|${params.value}\n\n}`
|
|
|
- ]
|
|
|
- return arr.join(' ')
|
|
|
+ name: '', // 自己根据场景修改
|
|
|
+ type: 'pie',
|
|
|
+ hoverAnimation: false, // 悬停不放大
|
|
|
+ labelLine: {
|
|
|
+ length: this.EchartfontSize(30),
|
|
|
+ length2: this.EchartfontSize(60),
|
|
|
+ lineStyle: {
|
|
|
+ width: this.EchartfontSize(2)
|
|
|
+ }
|
|
|
},
|
|
|
- rich: {
|
|
|
- a: {
|
|
|
- color: '#ffffff',
|
|
|
- fontSize: this.EchartfontSize(14)
|
|
|
+ label: {
|
|
|
+ position: 'outside',
|
|
|
+ padding: [0, -this.EchartfontSize(50)],
|
|
|
+ formatter: (params) => {
|
|
|
+ const arr = [
|
|
|
+ `{a|${params.name}}`,
|
|
|
+ `{b|${params.value}\n\n}`
|
|
|
+ ]
|
|
|
+ return arr.join(' ')
|
|
|
},
|
|
|
- b: {
|
|
|
- color: 'rgba(33,229,248)',
|
|
|
- fontSize: this.EchartfontSize(14),
|
|
|
- verticalAlign: 'top',
|
|
|
- align: 'center'
|
|
|
+ rich: {
|
|
|
+ a: {
|
|
|
+ color: '#ffffff',
|
|
|
+ fontSize: this.EchartfontSize(14)
|
|
|
+ },
|
|
|
+ b: {
|
|
|
+ color: 'rgba(33,229,248)',
|
|
|
+ fontSize: this.EchartfontSize(14),
|
|
|
+ verticalAlign: 'top',
|
|
|
+ align: 'center'
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- },
|
|
|
- startAngle: 25, // 起始角度,支持范围[0, 360]。
|
|
|
- clockwise: false, // 饼图的扇区是否是顺时针排布。上述这两项配置主要是为了对齐3d的样式
|
|
|
- radius: ['50%', '50%'],
|
|
|
- center: ['50%', '50%'],
|
|
|
- data: optionData,
|
|
|
- itemStyle: {
|
|
|
- opacity: 0 // 这里必须是0,不然2d的图会覆盖在表面
|
|
|
- }
|
|
|
- })
|
|
|
+ },
|
|
|
+ startAngle: 25, // 起始角度,支持范围[0, 360]。
|
|
|
+ clockwise: false, // 饼图的扇区是否是顺时针排布。上述这两项配置主要是为了对齐3d的样式
|
|
|
+ radius: ['50%', '50%'],
|
|
|
+ center: ['50%', '50%'],
|
|
|
+ data: optionData,
|
|
|
+ itemStyle: {
|
|
|
+ opacity: 0 // 这里必须是0,不然2d的图会覆盖在表面
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
}
|