diff --git a/src/views/LimitAnalyse/components/DataVisualizationComponents.js b/src/views/LimitAnalyse/components/DataVisualizationComponents.js
index a52a25ba..b8261a8b 100644
--- a/src/views/LimitAnalyse/components/DataVisualizationComponents.js
+++ b/src/views/LimitAnalyse/components/DataVisualizationComponents.js
@@ -39,17 +39,6 @@ import {
import { getFormattedTextProps } from '../../../utils/textUtils';
import { ExternalLinkIcon } from '@chakra-ui/icons';
import RiskDisclaimer from '../../../components/RiskDisclaimer';
-import {
- BarChart, Bar,
- PieChart, Pie, Cell,
- XAxis, YAxis,
- CartesianGrid,
- Tooltip as RechartsTooltip,
- Legend,
- ResponsiveContainer,
- Treemap,
- Area, AreaChart,
-} from 'recharts';
import ReactECharts from 'echarts-for-react';
import 'echarts-wordcloud';
// 颜色配置
@@ -137,6 +126,149 @@ const WordCloud = ({ data }) => {
return ;
};
+// 板块分布饼图 - ECharts 实现
+const SectorPieChart = ({ data }) => {
+ if (!data || data.length === 0) {
+ return (
+
+ 暂无数据
+
+ );
+ }
+
+ const option = {
+ tooltip: {
+ trigger: 'item',
+ formatter: '{b}: {c} ({d}%)'
+ },
+ legend: {
+ orient: 'vertical',
+ right: 10,
+ top: 'center',
+ textStyle: { fontSize: 12 }
+ },
+ series: [{
+ type: 'pie',
+ radius: ['0%', '65%'],
+ center: ['40%', '50%'],
+ avoidLabelOverlap: true,
+ itemStyle: {
+ borderRadius: 4,
+ borderColor: '#fff',
+ borderWidth: 2
+ },
+ label: {
+ show: true,
+ formatter: '{b} {d}%',
+ fontSize: 12
+ },
+ labelLine: {
+ show: true,
+ length: 10,
+ length2: 15
+ },
+ emphasis: {
+ label: {
+ show: true,
+ fontSize: 14,
+ fontWeight: 'bold'
+ },
+ itemStyle: {
+ shadowBlur: 10,
+ shadowOffsetX: 0,
+ shadowColor: 'rgba(0, 0, 0, 0.5)'
+ }
+ },
+ data: data.map((item, index) => ({
+ name: item.name,
+ value: item.value,
+ itemStyle: { color: CHART_COLORS[index % CHART_COLORS.length] }
+ })),
+ animationDuration: 800
+ }]
+ };
+
+ return (
+
+ );
+};
+
+// 时间分布环形图 - ECharts 实现
+const TimeDistributionChart = ({ data }) => {
+ if (!data || data.length === 0) {
+ return (
+
+ 暂无数据
+
+ );
+ }
+
+ const option = {
+ tooltip: {
+ trigger: 'item',
+ formatter: '{b}: {c} ({d}%)'
+ },
+ legend: {
+ orient: 'horizontal',
+ bottom: 10,
+ textStyle: { fontSize: 12 }
+ },
+ series: [{
+ type: 'pie',
+ radius: ['45%', '70%'],
+ center: ['50%', '45%'],
+ avoidLabelOverlap: true,
+ padAngle: 3,
+ itemStyle: {
+ borderRadius: 6,
+ borderColor: '#fff',
+ borderWidth: 2
+ },
+ label: {
+ show: true,
+ position: 'outside',
+ formatter: '{b}\n{c}只',
+ fontSize: 11
+ },
+ labelLine: {
+ show: true,
+ length: 8,
+ length2: 12
+ },
+ emphasis: {
+ label: {
+ show: true,
+ fontSize: 13,
+ fontWeight: 'bold'
+ },
+ itemStyle: {
+ shadowBlur: 10,
+ shadowOffsetX: 0,
+ shadowColor: 'rgba(0, 0, 0, 0.5)'
+ }
+ },
+ data: data.map(item => ({
+ name: item.name,
+ value: item.value,
+ itemStyle: { color: item.color }
+ })),
+ animationDuration: 800
+ }]
+ };
+
+ return (
+
+ );
+};
+
// 板块热力图组件
const SectorHeatMap = ({ data }) => {
if (!data) return null;
@@ -496,27 +628,7 @@ export const DataAnalysis = ({ dailyData, wordCloudData, totalStocks, dateStr })
-
-
- `${name} ${(percent * 100).toFixed(0)}%`}
- outerRadius={120}
- fill="#8884d8"
- dataKey="value"
- animationBegin={0}
- animationDuration={800}
- >
- {pieData.map((entry, index) => (
- |
- ))}
-
-
-
-
+
@@ -545,25 +657,7 @@ export const DataAnalysis = ({ dailyData, wordCloudData, totalStocks, dateStr })
-
-
-
- {timeDistributionData.map((entry, index) => (
- |
- ))}
-
-
-
-
+
{timeDistributionData.map((item, index) => (