瀏覽代碼

Fix bug in heatmap point add

Lucas de Souza 5 年之前
父節點
當前提交
30ea496580
共有 4 個文件被更改,包括 7 次插入5 次删除
  1. 1 1
      dist/line_heatmap.js
  2. 1 1
      dist/line_heatmap.js.map
  3. 0 1
      src/heatContainer.js
  4. 5 2
      src/lineHeatmap.js

File diff suppressed because it is too large
+ 1 - 1
dist/line_heatmap.js


File diff suppressed because it is too large
+ 1 - 1
dist/line_heatmap.js.map


+ 0 - 1
src/heatContainer.js

@@ -26,7 +26,6 @@ function init (elementId, logString) {
       start: [1, logData.length],
       connect: true,
       margin: 1,
-      step: 1,
       range: {
           'min': 1,
           'max': logData.length

+ 5 - 2
src/lineHeatmap.js

@@ -18,9 +18,12 @@ export default class LineHeatmap {
 
   setTrackData (data) {
     this.heatmap.setData({
-      max: Number.MAX_SAFE_INTEGER,
+      max: 0,
       min: 0,
-      data: data
+      data: []
+    });
+    data.forEach(point => {
+      this.heatmap.addData(point);
     });
   }
 }