From commits-return-1147-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Fri Jun 22 03:05:00 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 322AE18067A for ; Fri, 22 Jun 2018 03:05:00 +0200 (CEST) Received: (qmail 51784 invoked by uid 500); 22 Jun 2018 01:04:59 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 51775 invoked by uid 99); 22 Jun 2018 01:04:59 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2018 01:04:59 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id C2E9A850C0; Fri, 22 Jun 2018 01:04:58 +0000 (UTC) Date: Fri, 22 Jun 2018 01:04:58 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: [bugfix] get word_cloud to support complex metrics (#5248) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152962949860.23154.17446302541171615017@gitbox.apache.org> From: maximebeauchemin@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 2f274328ed05f4104d63cce6433a4053d105ba00 X-Git-Newrev: 5a716e99258341b56f51bb97e345da6e62205c41 X-Git-Rev: 5a716e99258341b56f51bb97e345da6e62205c41 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 5a716e9 [bugfix] get word_cloud to support complex metrics (#5248) 5a716e9 is described below commit 5a716e99258341b56f51bb97e345da6e62205c41 Author: Maxime Beauchemin AuthorDate: Thu Jun 21 18:04:56 2018 -0700 [bugfix] get word_cloud to support complex metrics (#5248) --- superset/viz.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/superset/viz.py b/superset/viz.py index 6b5b68c..cd11709 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -721,14 +721,13 @@ class WordCloudViz(BaseViz): def query_obj(self): d = super(WordCloudViz, self).query_obj() - - d['metrics'] = [self.form_data.get('metric')] d['groupby'] = [self.form_data.get('series')] return d def get_data(self, df): + fd = self.form_data # Ordering the columns - df = df[[self.form_data.get('series'), self.form_data.get('metric')]] + df = df[[fd.get('series'), self.metric_labels[0]]] # Labeling the columns for uniform json schema df.columns = ['text', 'size'] return df.to_dict(orient='records')