wangsisi 1 день назад
Родитель
Сommit
69f93696bd

+ 1 - 1
src/views/warningHome/components/chart_components/barChart.vue

@@ -38,7 +38,7 @@ const initData = () => {
             // 调整 grid 的 bottom,为 dataZoom 留出空间
             newOption.grid.bottom = 20;
             // 使用滚动时,不需要旋转标签
-            newOption.xAxis.axisLabel.rotate = 25;
+            newOption.xAxis.axisLabel.rotate = 20;
 
             // 添加 dataZoom 配置,实现 x 轴滚动
             newOption.dataZoom = [

+ 1 - 3
src/views/warningHome/components/chart_components/chartList.vue

@@ -261,9 +261,7 @@ const fetchStatPhenologyAreaRatioForGrain = () => {
             if (res.code === 0 && res.data && res.data.length > 0) {
                 // 转换接口数据为图表格式(物候进程分布)
                 // 横轴:作物名称(有物候期则为“作物名(物候期)”),纵轴:面积占比(百分比)
-                const categories = res.data.map((item) =>
-                    item.phenologyName ? `${item.speciesName}(${item.phenologyName})` : item.speciesName
-                );
+                const categories = res.data.map((item) => item.phenologyName);
                 const values = res.data.map((item) => parseFloat((item.areaRatio * 100).toFixed(2)));
 
                 // 更新区域图表数据