mistercrunch closed pull request #4467: [geo] add controls for minRadiusPixels 
and maxRadiusPixels in deck_scatter
URL: https://github.com/apache/incubator-superset/pull/4467
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/javascripts/explore/stores/controls.jsx 
b/superset/assets/javascripts/explore/stores/controls.jsx
index 22b8b32365..11b572a900 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 3135b2613d..e81e7b815f 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 5022fbccda..087df3d7ef 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),
   });


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to