mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
Improvements to the polygon spatial viz (#6178)
* WIP * WIP * WIP * WIP * Fix color bucketing * Fixed colors * Fix no num categories selected * Colors working * Fix no metric selected * Visual cues for selection * Add unit tests * Remove jest from deps * Rename category to bucket * Small fixes * Fix lint * Fix unit tests * Remove duplicate hexToRGB * Fix import * Change order of arguments in getBuckets * Refactor function signature
This commit is contained in:
@@ -31,7 +31,7 @@ export function fitViewport(viewport, points, padding = 10) {
|
||||
}
|
||||
}
|
||||
|
||||
export function commonLayerProps(formData, onAddFilter, setTooltip) {
|
||||
export function commonLayerProps(formData, setTooltip, onSelect) {
|
||||
const fd = formData;
|
||||
let onHover;
|
||||
let tooltipContentGenerator;
|
||||
@@ -64,8 +64,8 @@ export function commonLayerProps(formData, onAddFilter, setTooltip) {
|
||||
const href = sandboxedEval(fd.js_onclick_href)(o);
|
||||
window.open(href);
|
||||
};
|
||||
} else if (fd.table_filter && fd.line_type === 'geohash') {
|
||||
onClick = o => onAddFilter(fd.line_column, [o.object[fd.line_column]], false);
|
||||
} else if (fd.table_filter && onSelect !== undefined) {
|
||||
onClick = o => onSelect(o.object[fd.line_column]);
|
||||
}
|
||||
return {
|
||||
onClick,
|
||||
|
||||
Reference in New Issue
Block a user