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 ed8bb1b  fix: issues #8041 - bubble support for complex metrics (#8044)
ed8bb1b is described below

commit ed8bb1b694e95df661bb99ff877097d749a0c9e0
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Wed Aug 14 09:27:18 2019 -0700

    fix: issues #8041 - bubble support for complex metrics (#8044)
---
 superset/viz.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/superset/viz.py b/superset/viz.py
index abd908c..ae4b0a7 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -966,7 +966,9 @@ class BubbleViz(NVD3Viz):
         self.series = form_data.get("series") or self.entity
         d["row_limit"] = form_data.get("limit")
 
-        d["metrics"] = list(set([self.z_metric, self.x_metric, self.y_metric]))
+        d["metrics"] = [self.z_metric, self.x_metric, self.y_metric]
+        if len(set(self.metric_labels)) < 3:
+            raise Exception(_("Please use 3 different metric labels"))
         if not all(d["metrics"] + [self.entity]):
             raise Exception(_("Pick a metric for x, y and size"))
         return d

Reply via email to