Переглянути джерело

fix: 数据大屏折线图可以添加说明名称

zhangying 8 місяців тому
батько
коміт
3336022e1e

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

@@ -6,8 +6,9 @@ import * as echarts from 'echarts';
  * @param seriesList 折线数据内容
  * @param legendList 图表数据说明
  * @param domId 目标DOM元素ID
+ * @param xAxisName X轴刻度名称
  */
-export function initLineImageTable(xTitleList: any, seriesList: any, legendList: any, domId: any) {
+export function initLineImageTable(xTitleList: any, seriesList: any, legendList: any, domId: any, xAxisName: any) {
   const chartDom = document.getElementById(domId);
   let myChart = echarts.init(chartDom);
   if (myChart != null) {
@@ -32,12 +33,13 @@ export function initLineImageTable(xTitleList: any, seriesList: any, legendList:
     grid: {
       top: '3%',
       left: '3%',
-      right: '3%',
+      right: '5%',
       bottom: '30px',
       containLabel: true
     },
     xAxis: {
       type: 'category',
+      name: xAxisName,
       boundaryGap: false,
       data: xTitleList,
       axisLabel: {

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

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

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

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