This commit is contained in:
刘龙龙 2023-12-15 10:36:42 +08:00
parent 6afdbd4d85
commit d12dd164c5
4 changed files with 273 additions and 15002 deletions

View File

@ -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 };

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -442,10 +442,7 @@ export default {
myChart.setOption(this.option1);
},
},
mounted() {
this.dldy();
this.ssfh();
},
mounted() {},
beforeDestroy() {
this.falg = false;
},