瀏覽代碼

fix: 折线图微调

zhangying 3 月之前
父節點
當前提交
cd8b474b39

+ 3 - 2
vue/src/views/dataScreen/echarts.ts

@@ -7,8 +7,9 @@ import * as echarts from 'echarts';
  * @param legendList 图表数据说明
  * @param domId 目标DOM元素ID
  * @param xAxisName X轴刻度名称
+ * @param gridRight 右侧边距
  */
-export function initLineImageTable(xTitleList: any, seriesList: any, legendList: any, domId: any, xAxisName: any) {
+export function initLineImageTable(xTitleList: any, seriesList: any, legendList: any, domId: any, xAxisName: any, gridRight: any) {
   const chartDom = document.getElementById(domId);
   let myChart = echarts.init(chartDom);
   if (myChart != null) {
@@ -33,7 +34,7 @@ export function initLineImageTable(xTitleList: any, seriesList: any, legendList:
     grid: {
       top: '3%',
       left: '3%',
-      right: '5%',
+      right: gridRight,
       bottom: '30px',
       containLabel: true
     },

+ 1 - 1
vue/src/views/dataScreen/html/index.vue

@@ -309,7 +309,7 @@ function loadYearData() {
     }
 
     // 初始化图表
-    initLineImageTable(yearNameList, yearLineData, ["驿站人员", "企业数量", "岗位数量", "求职人数"], "yearSystemApplyBox", "");
+    initLineImageTable(yearNameList, yearLineData, ["驿站人员", "企业数量", "岗位数量", "求职人数"], "yearSystemApplyBox", "", "3%");
   })
 }
 

+ 1 - 1
vue/src/views/dataScreen/html/sysService.vue

@@ -373,7 +373,7 @@ function loadOneDaySystemDataCount() {
       },
     ];
     // 初始化图表
-    initLineImageTable(xTitleArr, yearLineData, ["企业数量", "岗位数量", "求职人数"], "daySystemDataCountBox", "小时");
+    initLineImageTable(xTitleArr, yearLineData, ["企业数量", "岗位数量", "求职人数"], "daySystemDataCountBox", "小时", "5%");
   });
 }