This commit is contained in:
parent
6afdbd4d85
commit
d12dd164c5
|
|
@ -14,7 +14,7 @@ const getPie3D = (
|
|||
alpha,
|
||||
pieHeight,
|
||||
opacity = 1
|
||||
) => {
|
||||
) => {
|
||||
const series = [];
|
||||
let sumValue = 0;
|
||||
let startValue = 0;
|
||||
|
|
@ -171,19 +171,19 @@ const getPie3D = (
|
|||
series: series,
|
||||
};
|
||||
return option;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
* 生成扇形的曲面参数方程,用于 series-surface.parametricEquation
|
||||
*/
|
||||
const getParametricEquation = (
|
||||
const getParametricEquation = (
|
||||
startRatio,
|
||||
endRatio,
|
||||
isSelected,
|
||||
isHovered,
|
||||
k,
|
||||
h
|
||||
) => {
|
||||
) => {
|
||||
// 计算
|
||||
const midRatio = (startRatio + endRatio) / 2;
|
||||
const startRadian = startRatio * Math.PI * 2;
|
||||
|
|
@ -248,22 +248,22 @@ const getPie3D = (
|
|||
return Math.sin(v) > 0 ? 1 * h * 0.1 : -1;
|
||||
},
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
* 获取3d丙图的最高扇区的高度
|
||||
*/
|
||||
const getHeight3D = (series, height) => {
|
||||
const getHeight3D = (series, height) => {
|
||||
series.sort((a, b) => {
|
||||
return b.pieData.value - a.pieData.value;
|
||||
});
|
||||
return (height * 25) / series[0].pieData.value;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
* 格式化浮点数
|
||||
*/
|
||||
const fomatFloat = (num, n) => {
|
||||
const fomatFloat = (num, n) => {
|
||||
let f = parseFloat(num);
|
||||
if (isNaN(f)) {
|
||||
return false;
|
||||
|
|
@ -280,8 +280,6 @@ const getPie3D = (
|
|||
s += "0";
|
||||
}
|
||||
return s;
|
||||
};
|
||||
|
||||
export { getPie3D, getParametricEquation };
|
||||
|
||||
};
|
||||
|
||||
export { getPie3D, getParametricEquation };
|
||||
|
|
|
|||
1551
src/utils/index.js
1551
src/utils/index.js
File diff suppressed because it is too large
Load Diff
13173
src/utils/yinru.js
13173
src/utils/yinru.js
File diff suppressed because it is too large
Load Diff
|
|
@ -442,10 +442,7 @@ export default {
|
|||
myChart.setOption(this.option1);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.dldy();
|
||||
this.ssfh();
|
||||
},
|
||||
mounted() {},
|
||||
beforeDestroy() {
|
||||
this.falg = false;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue