apache/superset · error · Error
Polygon column is required for Polygon charts
Error message
Polygon column is required for Polygon charts
What it means
Thrown by the deck.gl Polygon layer's buildQuery when line_column is missing. Despite the name, in the Polygon layer line_column holds the polygon geometry (closed coordinate string) for each row; the metric just colors it. Without that column the layer has nothing to render, so query building aborts.
Source
Thrown at superset-frontend/plugins/preset-chart-deckgl/src/layers/Polygon/buildQuery.ts:65
reverse_long_lat?: boolean;
filter_nulls?: boolean;
cross_filter_column?: string | null;
tooltip_contents?: unknown[];
tooltip_template?: string;
}
export default function buildQuery(formData: DeckPolygonFormData) {
const {
line_column,
metric,
point_radius_fixed,
filter_nulls = true,
cross_filter_column,
tooltip_contents,
} = formData;
if (!line_column) {
throw new Error('Polygon column is required for Polygon charts');
}
return buildQueryContext(formData, (baseQueryObject: QueryObject) => {
let columns: QueryFormColumn[] = [
...ensureIsArray(baseQueryObject.columns || []),
line_column,
];
if (cross_filter_column && !columns.includes(cross_filter_column)) {
columns.push(cross_filter_column);
}
columns = addTooltipColumnsToQuery(columns, tooltip_contents);
const metrics = [];
if (metric) {
metrics.push(metric);
}View on GitHub (pinned to f4587218dd)
Solutions
- Open the Polygon chart in Explore and select the polygon geometry column, then save.
- Check the dataset still contains the geometry column; fix renames in the dataset editor.
- Supply line_column when constructing the chart or query context programmatically.
Example fix
// before
buildQuery(formData); // line_column undefined
// after
if (!formData.line_column) {
throw new Error('Polygon chart requires a geometry column');
}
buildQuery(formData); Defensive patterns
Strategy: validation
Validate before calling
if (!formData.line_column) {
throw new Error('Polygon chart requires a geometry column');
}
buildQuery(formData); Type guard
const hasPolygonColumn = (fd: DeckPolygonFormData): boolean => Boolean(fd.line_column);
Try / catch
try { buildQuery(formData); } catch (e) { if (e.message.includes('Polygon column')) showConfigToast(e.message); else throw e; } Prevention
- Remember line_column is the polygon geometry in this layer
- Validate saved params after dataset re-binds
When it happens
Trigger: Running a Deck.gl Polygon chart whose polygon geometry control (stored as line_column) is unset, or saved/API params omitting it.
Common situations: Polygon chart saved before the geometry column was chosen; dataset schema drift; dashboards imported with incomplete form params; converting another deck.gl chart type to Polygon without filling the geometry control.
Related errors
- Start and end spatial configurations are required for Arc ch
- GeoJSON column is required for GeoJSON charts
- Line column is required for Path charts
- Spatial configuration is required for Scatter charts
- Spatial configuration is required for this chart
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/a92770faa8f84c72.
Report an issue: GitHub.