mirror of https://github.com/apache/superset.git
[geo] add controls for minRadiusPixels and maxRadiusPixels in deck_scatter (#4467)
This commit is contained in:
parent
d57a37e341
commit
2932585c65
|
@ -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'),
|
||||
|
|
|
@ -648,6 +648,7 @@ export const visTypes = {
|
|||
label: t('Point Size'),
|
||||
controlSetRows: [
|
||||
['point_radius_fixed', 'point_unit'],
|
||||
['min_radius', 'max_radius'],
|
||||
['multiplier', null],
|
||||
],
|
||||
},
|
||||
|
|
|
@ -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),
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue