-
Notifications
You must be signed in to change notification settings - Fork 15.4k
fix(Table chart): fix percentage metric column #34175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
Category | Issue | Status |
---|---|---|
Incorrect percentage metric filtering logic ▹ view | ✅ Fix detected |
Files scanned
File Path | Reviewed |
---|---|
superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx | ✅ |
superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
if ( | ||
explore.form_data.metrics?.some( | ||
metric => getMetricLabel(metric) === colname, | ||
) || | ||
colname && | ||
!colname.startsWith('%') && | ||
colnames.includes(`%${colname}`) && | ||
explore.form_data.percent_metrics?.some( | ||
(metric: QueryFormMetric) => | ||
getMetricLabel(metric) === colname, | ||
) && | ||
!explore.form_data.metrics?.some( | ||
(metric: QueryFormMetric) => | ||
getMetricLabel(metric) === colname, | ||
) | ||
) { | ||
return; | ||
} |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
110463b
to
19cde09
Compare
superset-frontend/packages/superset-ui-core/src/chart/models/ChartProps.ts
Outdated
Show resolved
Hide resolved
...-frontend/packages/superset-ui-core/src/chart/registries/ChartBuildQueryRegistrySingleton.ts
Outdated
Show resolved
Hide resolved
...t-frontend/packages/superset-ui-core/src/chart/registries/ChartComponentRegistrySingleton.ts
Outdated
Show resolved
Hide resolved
...rontend/packages/superset-ui-core/src/chart/registries/ChartControlPanelRegistrySingleton.ts
Outdated
Show resolved
Hide resolved
...et-frontend/packages/superset-ui-core/src/chart/registries/ChartMetadataRegistrySingleton.ts
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-core/src/query/getClientErrorObject.ts
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-core/src/query/getXAxis.ts
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-core/src/time-format/TimeFormatterRegistrySingleton.ts
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-core/src/utils/isJsonString.ts
Outdated
Show resolved
Hide resolved
1ab405f
to
19cde09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !!
SUMMARY
Related to PR. Fixes a bug in the Table chart where percentage metrics (e.g., %count) did not appear or behave correctly in the Customize Columns section.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE
2025-07-17.20-41-55.mp4
AFTER
after.mp4
TESTING INSTRUCTIONS
You should now:
a)See Main %count listed and the child columns.
b)Be able to rename it (e.g., "Conversion Rate")
c)Hide child columns, and verify they disappear from the table
d)Also verify that comparison columns for %count are generated properly when time comparison is enabled and regular metrics like COUNT(*) are preserved and configurable
ADDITIONAL INFORMATION