From commits-return-2862-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Sun Jun 23 22:53:36 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 897EE180679 for ; Mon, 24 Jun 2019 00:53:36 +0200 (CEST) Received: (qmail 77516 invoked by uid 500); 23 Jun 2019 22:53:35 -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 77505 invoked by uid 99); 23 Jun 2019 22:53:35 -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; Sun, 23 Jun 2019 22:53:35 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 8561987AD7; Sun, 23 Jun 2019 22:53:35 +0000 (UTC) Date: Sun, 23 Jun 2019 22:53:35 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: Fix deck.gl sample charts with js (#7749) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <156133041492.10481.2267126450779009470@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: 9c0c16c71b0fd9ef82b86f7fbf0f9d297820436a X-Git-Newrev: 1df4fa26c25e63330ec7d8bfc93f1f13a418705f X-Git-Rev: 1df4fa26c25e63330ec7d8bfc93f1f13a418705f 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 1df4fa2 Fix deck.gl sample charts with js (#7749) 1df4fa2 is described below commit 1df4fa26c25e63330ec7d8bfc93f1f13a418705f Author: Ville Brofeldt <33317356+villebro@users.noreply.github.com> AuthorDate: Mon Jun 24 01:53:26 2019 +0300 Fix deck.gl sample charts with js (#7749) * Fix js_data_mutator * Remove redundant line change * Add missing line changes --- superset/data/deck.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/superset/data/deck.py b/superset/data/deck.py index 80e7581..398255c 100644 --- a/superset/data/deck.py +++ b/superset/data/deck.py @@ -416,10 +416,11 @@ def load_deck_dash(): 'population', 'area', ], - 'js_datapoint_mutator': - '(d) => {\n d.elevation = d.extraProps.population/d.extraProps.area/10\n \ - d.fillColor = [d.extraProps.population/d.extraProps.area/60,140,0]\n \ - return d;\n}', + 'js_data_mutator': + 'data => data.map(d => ({\n' + ' ...d,\n' + ' elevation: d.extraProps.population/d.extraProps.area/10,\n' + '}));', 'js_tooltip': '', 'js_onclick_href': '', 'where': '', @@ -533,8 +534,10 @@ def load_deck_dash(): 'js_columns': [ 'color', ], - 'js_datapoint_mutator': 'd => {\n return {\n ...d,\n color: \ - colors.hexToRGB(d.extraProps.color),\n }\n}', + 'js_data_mutator': 'data => data.map(d => ({\n' + ' ...d,\n' + ' color: colors.hexToRGB(d.extraProps.color)\n' + '}));', 'js_tooltip': '', 'js_onclick_href': '', 'where': '',