File tree Expand file tree Collapse file tree 9 files changed +26
-20
lines changed
superset-frontend/plugins/legacy-preset-chart-deckgl/src Expand file tree Collapse file tree 9 files changed +26
-20
lines changed Original file line number Diff line number Diff line change @@ -26,3 +26,5 @@ export { default as PathChartPlugin } from './layers/Path';
2626export { default as PolygonChartPlugin } from './layers/Polygon' ;
2727export { default as ScatterChartPlugin } from './layers/Scatter' ;
2828export { default as ScreengridChartPlugin } from './layers/Screengrid' ;
29+ export { default as ContourChartPlugin } from './layers/Contour' ;
30+ export { default as HeatmapChartPlugin } from './layers/Heatmap' ;
Original file line number Diff line number Diff line change @@ -45,16 +45,16 @@ function setTooltipContent(formData: QueryFormData) {
4545 < div className = "deckgl-tooltip" >
4646 < TooltipRow
4747 label = { t ( 'Start (Longitude, Latitude): ' ) }
48- value = { `${ o . object . sourcePosition [ 0 ] } , ${ o . object . sourcePosition [ 1 ] } ` }
48+ value = { `${ o . object ? .sourcePosition ?. [ 0 ] } , ${ o . object ? .sourcePosition ?. [ 1 ] } ` }
4949 />
5050 < TooltipRow
5151 label = { t ( 'End (Longitude, Latitude): ' ) }
52- value = { `${ o . object . targetPosition [ 0 ] } , ${ o . object . targetPosition [ 1 ] } ` }
52+ value = { `${ o . object ? .targetPosition ?. [ 0 ] } , ${ o . object ? .targetPosition ?. [ 1 ] } ` }
5353 />
5454 { formData . dimension && (
5555 < TooltipRow
56- label = { `${ formData . dimension } : ` }
57- value = { `${ o . object . cat_color } ` }
56+ label = { `${ formData ? .dimension } : ` }
57+ value = { `${ o . object ? .cat_color } ` }
5858 />
5959 ) }
6060 </ div >
Original file line number Diff line number Diff line change @@ -93,13 +93,13 @@ const recurseGeoJson = (
9393
9494function setTooltipContent ( o : JsonObject ) {
9595 return (
96- o . object . extraProps && (
96+ o . object ? .extraProps && (
9797 < div className = "deckgl-tooltip" >
9898 { Object . keys ( o . object . extraProps ) . map ( ( prop , index ) => (
9999 < TooltipRow
100100 key = { `prop-${ index } ` }
101101 label = { `${ prop } : ` }
102- value = { `${ o . object . extraProps [ prop ] } ` }
102+ value = { `${ o . object . extraProps ?. [ prop ] } ` }
103103 />
104104 ) ) }
105105 </ div >
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ function setTooltipContent(o: JsonObject) {
3030 < div className = "deckgl-tooltip" >
3131 < TooltipRow
3232 label = { t ( 'Centroid (Longitude and Latitude): ' ) }
33- value = { `(${ o . coordinate [ 0 ] } , ${ o . coordinate [ 1 ] } )` }
33+ value = { `(${ o ? .coordinate [ 0 ] } , ${ o ? .coordinate [ 1 ] } )` }
3434 />
3535 </ div >
3636 ) ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import { Point } from '../../types';
2929
3030function setTooltipContent ( o : JsonObject ) {
3131 return (
32- o . object . extraProps && (
32+ o . object ? .extraProps && (
3333 < div className = "deckgl-tooltip" >
3434 { Object . keys ( o . object . extraProps ) . map ( ( prop , index ) => (
3535 < TooltipRow
Original file line number Diff line number Diff line change @@ -62,27 +62,27 @@ function getElevation(
6262
6363function setTooltipContent ( formData : PolygonFormData ) {
6464 return ( o : JsonObject ) => {
65- const metricLabel = formData . metric . label || formData . metric ;
65+ const metricLabel = formData ? .metric ? .label || formData ? .metric ;
6666
6767 return (
6868 < div className = "deckgl-tooltip" >
69- { o . object . name && (
69+ { o . object ? .name && (
7070 < TooltipRow
7171 // eslint-disable-next-line prefer-template
7272 label = { t ( 'name' ) + ': ' }
7373 value = { `${ o . object . name } ` }
7474 />
7575 ) }
76- { o . object [ formData . line_column ] && (
76+ { o . object ?. [ formData ? .line_column ] && (
7777 < TooltipRow
7878 label = { `${ formData . line_column } : ` }
7979 value = { `${ o . object [ formData . line_column ] } ` }
8080 />
8181 ) }
82- { formData . metric && (
82+ { formData ? .metric && (
8383 < TooltipRow
8484 label = { `${ metricLabel } : ` }
85- value = { `${ o . object [ metricLabel ] } ` }
85+ value = { `${ o . object ?. [ metricLabel ] } ` }
8686 />
8787 ) }
8888 </ div >
Original file line number Diff line number Diff line change @@ -48,17 +48,17 @@ function setTooltipContent(
4848 < TooltipRow
4949 // eslint-disable-next-line prefer-template
5050 label = { t ( 'Longitude and Latitude' ) + ': ' }
51- value = { `${ o . object . position [ 0 ] } , ${ o . object . position [ 1 ] } ` }
51+ value = { `${ o . object ? .position ?. [ 0 ] } , ${ o . object ? .position ?. [ 1 ] } ` }
5252 />
53- { o . object . cat_color && (
53+ { o . object ? .cat_color && (
5454 < TooltipRow
5555 // eslint-disable-next-line prefer-template
5656 label = { t ( 'Category' ) + ': ' }
57- value = { `${ o . object . cat_color } ` }
57+ value = { `${ o . object ? .cat_color } ` }
5858 />
5959 ) }
60- { o . object . metric && (
61- < TooltipRow label = { `${ label } : ` } value = { `${ o . object . metric } ` } />
60+ { o . object ? .metric && (
61+ < TooltipRow label = { `${ label } : ` } value = { `${ o . object ? .metric } ` } />
6262 ) }
6363 </ div >
6464 ) ;
Original file line number Diff line number Diff line change @@ -45,12 +45,12 @@ function setTooltipContent(o: JsonObject) {
4545 < TooltipRow
4646 // eslint-disable-next-line prefer-template
4747 label = { t ( 'Longitude and Latitude' ) + ': ' }
48- value = { `${ o . coordinate [ 0 ] } , ${ o . coordinate [ 1 ] } ` }
48+ value = { `${ o ? .coordinate ?. [ 0 ] } , ${ o ? .coordinate ?. [ 1 ] } ` }
4949 />
5050 < TooltipRow
5151 // eslint-disable-next-line prefer-template
5252 label = { t ( 'Weight' ) + ': ' }
53- value = { `${ o . object . cellWeight } ` }
53+ value = { `${ o . object ? .cellWeight } ` }
5454 />
5555 </ div >
5656 ) ;
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ import { getLayer as deck_scatter } from './Scatter/Scatter';
2525import { getLayer as deck_geojson } from './Geojson/Geojson' ;
2626import { getLayer as deck_arc } from './Arc/Arc' ;
2727import { getLayer as deck_polygon } from './Polygon/Polygon' ;
28+ import { getLayer as deck_heatmap } from './Heatmap/Heatmap' ;
29+ import { getLayer as deck_contour } from './Contour/Contour' ;
2830
2931const layerGenerators = {
3032 deck_grid,
@@ -35,6 +37,8 @@ const layerGenerators = {
3537 deck_geojson,
3638 deck_arc,
3739 deck_polygon,
40+ deck_heatmap,
41+ deck_contour,
3842} ;
3943
4044export default layerGenerators ;
You can’t perform that action at this time.
0 commit comments