- 移除饼图组件中已硬编码的 fontSize、dataLabel 和 legend 配置项,简化代码 - 移除自定义的 tooltipFormatter 函数,使用组件默认的提示框格式
@@ -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>