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: [time table] fix reversed ratio (#3597)
Date Wed, 04 Oct 2017 20:11:05 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 1528288  [time table] fix reversed ratio (#3597)
1528288 is described below

commit 1528288b595c4a07bf4fc18cb3382783e8ccd61a
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Wed Oct 4 13:11:02 2017 -0700

    [time table] fix reversed ratio (#3597)
---
 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 928352c..525a114 100644
--- a/superset/assets/visualizations/time_table.jsx
+++ b/superset/assets/visualizations/time_table.jsx
@@ -110,9 +110,9 @@ function viz(slice, payload) {
           if (c.comparisonType === 'diff') {
             v -= recent;
           } else if (c.comparisonType === 'perc') {
-            v /= recent;
+            v = recent / v;
           } else if (c.comparisonType === 'perc_change') {
-            v = (v / recent) - 1;
+            v = (recent / v) - 1;
           }
         } else if (c.colType === 'contrib') {
           // contribution to column total

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

Mime
View raw message