Explorar el Código

bug-8314 医疗咨询记录统计适应性调整

tianxinyu hace 1 semana
padre
commit
846ca6839b
Se han modificado 1 ficheros con 10 adiciones y 6 borrados
  1. 10 6
      src/views/component/statistics/consult.vue

+ 10 - 6
src/views/component/statistics/consult.vue

@@ -131,12 +131,14 @@ export default {
           left: 'center'
         },
         tooltip: {
-          trigger: 'item'
+          trigger: 'item',
+          confine: true,  // 把提示框限制在图表容器内
+          extraCssText: 'max-width: 400px; white-space: normal; word-wrap: break-word;',
         },
-
         legend: {
           orient: 'vertical',
-          left: 'left'
+          left: 'left',
+          textStyle: { width: 200, overflow: 'break' }
         },
         series: [
           {
@@ -176,12 +178,14 @@ export default {
           left: 'center'
         },
         tooltip: {
-          trigger: 'item'
+          trigger: 'item',
+          confine: true,  // 把提示框限制在图表容器内
+          extraCssText: 'max-width: 400px; white-space: normal; word-wrap: break-word;',
         },
-
         legend: {
           orient: 'vertical',
-          left: 'left'
+          left: 'left',
+          textStyle: { width: 200, overflow: 'break' }
         },
         series: [
           {