From 78fd71ed4bab2a30fc0fe16219916e4d9af28c3d Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期二, 15 十月 2024 10:32:27 +0800
Subject: [PATCH] labelWidth

---
 src/components/chat/chatComponents/hooks/useDrawChatChart.ts |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/components/chat/chatComponents/hooks/useDrawChatChart.ts b/src/components/chat/chatComponents/hooks/useDrawChatChart.ts
index 5266c73..c90a711 100644
--- a/src/components/chat/chatComponents/hooks/useDrawChatChart.ts
+++ b/src/components/chat/chatComponents/hooks/useDrawChatChart.ts
@@ -16,14 +16,14 @@
 		resizeChart?.(width, height);
 	};
 
-	onMounted(() => {
+	const initChart = ()=>{
 		setTimeout(() => {
 			const parent = chartRef.value.parentElement;
-
 			const parentBound = parent.getBoundingClientRect();
 			chartInstance.value = echarts.init(chartRef.value, undefined, {
 				width: parentBound.width,
 				height: parentBound.height,
+				locale: 'ZH',
 			});
 			resizeChart = debounce((width, height) => {
 				chartInstance.value.resize({
@@ -33,7 +33,11 @@
 			});
 
 			drawChart();
-		}, 300);
+		}, 100);
+	}
+
+	onMounted(() => {
+		initChart();
 	});
 
 	return {

--
Gitblit v1.9.3