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: [geo] add controls for minRadiusPixels and maxRadiusPixels in deck_scatter (#4467)
Date Mon, 26 Feb 2018 18:56:21 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 2932585  [geo] add controls for minRadiusPixels and maxRadiusPixels in deck_scatter
(#4467)
2932585 is described below

commit 2932585c659de9fa57bef0fe30d5adf4c0fc87aa
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Mon Feb 26 10:56:19 2018 -0800

    [geo] add controls for minRadiusPixels and maxRadiusPixels in deck_scatter (#4467)
---
 .../assets/javascripts/explore/stores/controls.jsx | 24 ++++++++++++++++++++++
 .../assets/javascripts/explore/stores/visTypes.js  |  1 +
 .../visualizations/deckgl/layers/scatter.jsx       |  2 ++
 3 files changed, 27 insertions(+)

diff --git a/superset/assets/javascripts/explore/stores/controls.jsx b/superset/assets/javascripts/explore/stores/controls.jsx
index 22b8b32..11b572a 100644
--- a/superset/assets/javascripts/explore/stores/controls.jsx
+++ b/superset/assets/javascripts/explore/stores/controls.jsx
@@ -1848,6 +1848,30 @@ export const controls = {
       'lower values are pruned first'),
   },
 
+  min_radius: {
+    type: 'TextControl',
+    label: t('Minimum Radius'),
+    isFloat: true,
+    validators: [v.nonEmpty],
+    renderTrigger: true,
+    default: 2,
+    description:
+    t('Minimum radius size of the circle, in pixels. As the zoom level changes, this ' +
+      'insures that the circle respects this minimum radius.'),
+  },
+
+  max_radius: {
+    type: 'TextControl',
+    label: t('Maximum Radius'),
+    isFloat: true,
+    validators: [v.nonEmpty],
+    renderTrigger: true,
+    default: 250,
+    description:
+    t('Maxium radius size of the circle, in pixels. As the zoom level changes, this ' +
+      'insures that the circle respects this maximum radius.'),
+  },
+
   partition_threshold: {
     type: 'TextControl',
     label: t('Partition Threshold'),
diff --git a/superset/assets/javascripts/explore/stores/visTypes.js b/superset/assets/javascripts/explore/stores/visTypes.js
index 3135b26..e81e7b8 100644
--- a/superset/assets/javascripts/explore/stores/visTypes.js
+++ b/superset/assets/javascripts/explore/stores/visTypes.js
@@ -648,6 +648,7 @@ export const visTypes = {
         label: t('Point Size'),
         controlSetRows: [
           ['point_radius_fixed', 'point_unit'],
+          ['min_radius', 'max_radius'],
           ['multiplier', null],
         ],
       },
diff --git a/superset/assets/visualizations/deckgl/layers/scatter.jsx b/superset/assets/visualizations/deckgl/layers/scatter.jsx
index 5022fbc..087df3d 100644
--- a/superset/assets/visualizations/deckgl/layers/scatter.jsx
+++ b/superset/assets/visualizations/deckgl/layers/scatter.jsx
@@ -76,6 +76,8 @@ function getLayer(formData, payload, slice, inFrame) {
     id: `scatter-layer-${fd.slice_id}`,
     data,
     fp64: true,
+    radiusMinPixels: fd.min_radius || null,
+    radiusMaxPixels: fd.max_radius || null,
     outline: false,
     ...common.commonLayerProps(fd, slice),
   });

-- 
To stop receiving notification emails like this one, please contact
maximebeauchemin@apache.org.

Mime
View raw message