Browse Source

修改图表选中的样式

lex-xin 3 tháng trước cách đây
mục cha
commit
12bd364c67

+ 7 - 0
src/teacher/statistics/home-statistics-detail/echats/index.tsx

@@ -82,6 +82,12 @@ const lineChartOption = (xAxisData: any, seriesData: any) => {
       },
       axisTick: {
         show: false
+      },
+      axisPointer: {
+        handle: {
+          show: true,
+          size: [0, 0]
+        }
       }
       // axisLabel: {
       //   formatter: function (value, index) {
@@ -168,6 +174,7 @@ const lineChartOption = (xAxisData: any, seriesData: any) => {
     },
     tooltip: {
       trigger: 'axis',
+      alwaysShowContent: true,
       confine: true,
       formatter: function (params: any) {
         return params[0].name

+ 7 - 0
src/teacher/statistics/home-statistics/index.tsx

@@ -99,6 +99,12 @@ const lineChartOption = (
         //   }
         // }
         // align: 'left'
+      },
+      axisPointer: {
+        handle: {
+          show: true,
+          size: [0, 0]
+        }
       }
     },
     color: [
@@ -165,6 +171,7 @@ const lineChartOption = (
     },
     tooltip: {
       trigger: 'axis',
+      alwaysShowContent: true,
       position: function (point) {
         // 固定在顶部
         return [point[0], '10%']

+ 7 - 0
src/teacher/statistics/practice-statistics-detail/echats/index.tsx

@@ -87,6 +87,12 @@ const lineChartOption = (params: {
       },
       axisTick: {
         show: false
+      },
+      axisPointer: {
+        handle: {
+          show: true,
+          size: [0, 0]
+        }
       }
     },
     color: [
@@ -144,6 +150,7 @@ const lineChartOption = (params: {
     },
     tooltip: {
       trigger: 'axis',
+      alwaysShowContent: true,
       confine: true,
       formatter: function (params: any) {
         return params[0].name