Browse Source

相关性tooltip显示修改

jwyu 2 years ago
parent
commit
31ba0cecc9
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/views/hzyb/chart/Detail.vue

+ 3 - 3
src/views/hzyb/chart/Detail.vue

@@ -429,15 +429,15 @@ const initRelevanceChart=(data)=>{
 
     let tooltip = {
         formatter: function() {
-          let str = `<p>相关性系数:${this.y}</p>`
+          let str = `<p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${this.x}期</p>`
           return str
         },
         formatterCh: function() {
-          let str = `<p>相关性系数:${this.y}</p>`
+          let str = `<p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${this.x}期</p>`
           return str
         },
         formatterEn: function() {
-          let str = `<p>Correlation coefficient:${this.y}</p>`
+          let str = `<p>Correlation coefficient:${this.y.toFixed(4)}</p><br><p>lead${this.x}stage</p>`
           return str
         }
     }