superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grace...@apache.org
Subject [incubator-superset] branch master updated: Adding back iso and correctly filtering iso from contrib total (#3793)
Date Tue, 07 Nov 2017 21:34:40 GMT
This is an automated email from the ASF dual-hosted git repository.

graceguo 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 e6129eb  Adding back iso and correctly filtering iso from contrib total (#3793)
e6129eb is described below

commit e6129eb49290234bdac48837c18b73c5132c125b
Author: michellethomas <michelle.q.thomas@gmail.com>
AuthorDate: Tue Nov 7 13:34:31 2017 -0800

    Adding back iso and correctly filtering iso from contrib total (#3793)
---
 superset/assets/visualizations/time_table.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset/assets/visualizations/time_table.jsx b/superset/assets/visualizations/time_table.jsx
index 5533108..42e929e 100644
--- a/superset/assets/visualizations/time_table.jsx
+++ b/superset/assets/visualizations/time_table.jsx
@@ -38,7 +38,7 @@ function viz(slice, payload) {
   slice.container.css('height', slice.height());
   const records = payload.data.records;
   const fd = payload.form_data;
-  const data = Object.keys(records).sort().map(iso => ({ ...records[iso] }));
+  const data = Object.keys(records).sort().map(iso => ({ ...records[iso], iso }));
   const reversedData = [...data].reverse();
   const metricMap = {};
   slice.datasource.metrics.forEach((m) => {
@@ -140,7 +140,7 @@ function viz(slice, payload) {
         } else if (c.colType === 'contrib') {
           // contribution to column total
           v = recent / Object.keys(reversedData[0])
-          .map(k => reversedData[0][k])
+          .map(k => k !== 'iso' ? reversedData[0][k] : null)
           .reduce((a, b) => a + b);
         } else if (c.colType === 'avg') {
           // Average over the last {timeLag}

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

Mime
View raw message