소스 검색

相关性tooltip显示修改

jwyu 2 년 전
부모
커밋
31ba0cecc9
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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
         }
     }