refactor: 优化图表组件和类型定义

1. 调整饼图位置,设置center为['50%', '30%']
2. 优化Analysis组件高度计算逻辑,减少addHeight增量
3. 更新图表名称,统一使用'yl form chart'
4. 添加PieSeriesOption类型定义,增强类型安全
5. 添加调试日志,方便排查问题
6. 修复formatData函数的类型定义
This commit is contained in:
Huangzhe
2025-05-19 19:09:22 +08:00
parent c221b4544a
commit 54d47ee45f
3 changed files with 26 additions and 13 deletions

View File

@@ -1,3 +1,5 @@
import type { PieSeriesOption } from 'echarts';
const option = {
// title: {
// text: 'Referer of a Website',
@@ -8,15 +10,15 @@ const option = {
// trigger: 'item'
// },
legend: {
orient: 'horizontal',
bottom: 'left'
// orient: 'horizontal',
bottom: 'top'
},
label: {
formatter: '{b},{c}'
// formatter: '{b},{c}'
},
series: [
{
name: 'Access From',
name: 'yl form chart',
type: 'pie',
radius: '50%',
data: [],
@@ -29,6 +31,6 @@ const option = {
}
}
]
};
} as PieSeriesOption;
export const pieOption = option;