You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2017/10/12 04:14:41 UTC
[incubator-superset] branch master updated: Fix #3612 - reverse
sign in difference calculation (#3646)
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 3ebadbc Fix #3612 - reverse sign in difference calculation (#3646)
3ebadbc is described below
commit 3ebadbcda9e3b733b702d585cefb11963ac16c01
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Wed Oct 11 21:14:39 2017 -0700
Fix #3612 - reverse sign in difference calculation (#3646)
---
superset/assets/visualizations/time_table.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/assets/visualizations/time_table.jsx b/superset/assets/visualizations/time_table.jsx
index c8f10e9..f318b00 100644
--- a/superset/assets/visualizations/time_table.jsx
+++ b/superset/assets/visualizations/time_table.jsx
@@ -109,7 +109,7 @@ function viz(slice, payload) {
// Time lag ratio
v = reversedData[parseInt(c.timeLag, 10)][metric];
if (c.comparisonType === 'diff') {
- v -= recent;
+ v = recent - v;
} else if (c.comparisonType === 'perc') {
v = recent / v;
} else if (c.comparisonType === 'perc_change') {
--
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <co...@superset.apache.org>'].