mirror of https://github.com/apache/superset.git
Fix deck.gl sample charts with js (#7749)
* Fix js_data_mutator * Remove redundant line change * Add missing line changes
This commit is contained in:
parent
9c0c16c71b
commit
1df4fa26c2
|
@ -416,10 +416,11 @@ def load_deck_dash():
|
||||||
'population',
|
'population',
|
||||||
'area',
|
'area',
|
||||||
],
|
],
|
||||||
'js_datapoint_mutator':
|
'js_data_mutator':
|
||||||
'(d) => {\n d.elevation = d.extraProps.population/d.extraProps.area/10\n \
|
'data => data.map(d => ({\n'
|
||||||
d.fillColor = [d.extraProps.population/d.extraProps.area/60,140,0]\n \
|
' ...d,\n'
|
||||||
return d;\n}',
|
' elevation: d.extraProps.population/d.extraProps.area/10,\n'
|
||||||
|
'}));',
|
||||||
'js_tooltip': '',
|
'js_tooltip': '',
|
||||||
'js_onclick_href': '',
|
'js_onclick_href': '',
|
||||||
'where': '',
|
'where': '',
|
||||||
|
@ -533,8 +534,10 @@ def load_deck_dash():
|
||||||
'js_columns': [
|
'js_columns': [
|
||||||
'color',
|
'color',
|
||||||
],
|
],
|
||||||
'js_datapoint_mutator': 'd => {\n return {\n ...d,\n color: \
|
'js_data_mutator': 'data => data.map(d => ({\n'
|
||||||
colors.hexToRGB(d.extraProps.color),\n }\n}',
|
' ...d,\n'
|
||||||
|
' color: colors.hexToRGB(d.extraProps.color)\n'
|
||||||
|
'}));',
|
||||||
'js_tooltip': '',
|
'js_tooltip': '',
|
||||||
'js_onclick_href': '',
|
'js_onclick_href': '',
|
||||||
'where': '',
|
'where': '',
|
||||||
|
|
Loading…
Reference in New Issue