Explorar el Código

♻️ refactor(statistics): 移除饼图组件冗余配置

- 移除饼图组件中已硬编码的 fontSize、dataLabel 和 legend 配置项,简化代码
- 移除自定义的 tooltipFormatter 函数,使用组件默认的提示框格式
yourname hace 2 semanas
padre
commit
40b80cc61c

+ 0 - 7
mini-ui-packages/yongren-statistics-ui/src/pages/Statistics/Statistics.tsx

@@ -394,13 +394,6 @@ const Statistics: React.FC<StatisticsProps> = () => {
                       series={convertToPieData(stats)}
                       config={{
                         color: ['#3b82f6', '#f59e0b', '#ef4444', '#10b981'],
-                        fontSize: 10,
-                        dataLabel: true,
-                        legend: { show: true }
-                      }}
-                      tooltipFormatter={(item: any) => {
-                        const statItem = stats.find(s => s.key === item.name)
-                        return `${item.name} ${item.data}人 (${statItem?.percentage || 0}%)`
                       }}
                     />
                   </View>