You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2019/11/18 16:05:12 UTC

[incubator-shardingsphere-benchmark] branch master updated: feature[shadingsphere-benchmark-ui]: Hide null data #24

This is an automated email from the ASF dual-hosted git repository.

zhaoyanan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shardingsphere-benchmark.git


The following commit(s) were added to refs/heads/master by this push:
     new 2fc64f2  feature[shadingsphere-benchmark-ui]: Hide null data #24
     new bf0c79f  Merge pull request #27 from wqzwh/master
2fc64f2 is described below

commit 2fc64f208680bcbe4d78fa17dab9f6c435e1c9be
Author: wqzwh <wa...@163.com>
AuthorDate: Mon Nov 18 18:39:34 2019 +0800

    feature[shadingsphere-benchmark-ui]: Hide null data #24
---
 shadingsphere-benchmark-ui/src/utils/line.js | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/shadingsphere-benchmark-ui/src/utils/line.js b/shadingsphere-benchmark-ui/src/utils/line.js
index 6538745..968df85 100644
--- a/shadingsphere-benchmark-ui/src/utils/line.js
+++ b/shadingsphere-benchmark-ui/src/utils/line.js
@@ -19,18 +19,20 @@ const getLineOptions = (name, xAxis, legend, series) => {
         let html = ``
         for (const v of d) {
           let p = ``
-          for (const vv in v.data) {
-            if (vv !== 'value' && vv !== 'Date') {
-              p += `<p>${vv}: ${v.data[vv]}</p>`
+          if (v.data.value !== 'null') {
+            for (const vv in v.data) {
+              if (vv !== 'value' && vv !== 'Date') {
+                p += `<p>${vv}: ${v.data[vv]}</p>`
+              }
             }
           }
-          html += `<div style="display:inline-block;margin: 10px;font-size: 14px;">
-            <p><span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${
-              v.color
-            };"></span>${v.data.Date}</p> 
+          if (v.data.Date !== 'Invalid date') {
+            html += `<div style="display:inline-block;margin: 10px;font-size: 14px;">
+            <p><span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${v.color};"></span>${v.data.Date}</p> 
             <p>${v.seriesName}</p>
             ${p}
           </div>`
+          }
         }
         return html ? `${html}` : ''
       },