superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Set tooltip to show extent of sparkData (#3626)
Date Tue, 10 Oct 2017 18:53:55 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 80eb9c2  Set tooltip to show extent of sparkData (#3626)
80eb9c2 is described below

commit 80eb9c2c645acd3ab0d5909b9c8ef3325b442139
Author: michellethomas <michelle.q.thomas@gmail.com>
AuthorDate: Tue Oct 10 11:53:53 2017 -0700

    Set tooltip to show extent of sparkData (#3626)
    
    * Set tooltip to show extent of sparkData
    
    * Using d3format instead of round
---
 superset/assets/visualizations/time_table.jsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/superset/assets/visualizations/time_table.jsx b/superset/assets/visualizations/time_table.jsx
index 89e9676..8dbb2e1 100644
--- a/superset/assets/visualizations/time_table.jsx
+++ b/superset/assets/visualizations/time_table.jsx
@@ -73,8 +73,9 @@ function viz(slice, payload) {
             sparkData.push(data[i][metric] / data[i - c.timeRatio][metric]);
           }
         }
-        const extent = d3.extent(data, d => d[metric]);
-        const tooltip = `min: ${extent[0]}, max: ${extent[1]}`;
+        const extent = d3.extent(sparkData);
+        const tooltip = `min: ${d3format(c.d3format, extent[0])}, \
+          max: ${d3format(c.d3format, extent[1])}`;
         row[c.key] = (
           <TooltipWrapper label="tt-spark" tooltip={tooltip}>
             <div>

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message