Skip to content

fix: Add dimension fallback for table charts#1368

Draft
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/table-chart-dimensions
Draft

fix: Add dimension fallback for table charts#1368
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/table-chart-dimensions

Conversation

@sentry
Copy link
Copy Markdown

@sentry sentry Bot commented May 22, 2026

This PR addresses issue DALGO-BACKEND-25E, a ValueError: At least one dimension is required for table charts.

Root Cause:
The normalize_dimensions function in ddpui/core/charts/charts_service.py for chart_type="table" only checked the payload.dimensions list. It did not include a fallback to payload.dimension_col or payload.extra_dimension when payload.dimensions was empty or None. This meant that table charts created using older API fields (which populate dimension_col instead of the dimensions array) would result in an empty dimension list, triggering the ValueError at line 387.

Changes Made:
Modified the normalize_dimensions function to include the fallback logic for payload.dimension_col and payload.extra_dimension within the chart_type="table" branch. Now, if payload.dimensions is empty, the function will correctly check and use the values from payload.dimension_col and payload.extra_dimension if they are present.

This change restores backward compatibility for table charts using legacy dimension fields.

Fixes DALGO-BACKEND-25E

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants