-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
fix: remove sort values on stacked totals #31333
base: master
Are you sure you want to change the base?
Conversation
215661b
to
e685c5d
Compare
superset-frontend/webpack.config.js
Outdated
@@ -568,7 +568,7 @@ if (isDevMode) { | |||
warnings: false, | |||
runtimeErrors: error => !/ResizeObserver/.test(error.message), | |||
}, | |||
logging: 'error', | |||
logging: 'verbose', |
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.
Is this intended?
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.
thanks for catching.. no that was just for testing.
33390fb
to
a3084fc
Compare
c860ef7
to
e0efdfc
Compare
/testenv up |
2e38e59
to
5e87689
Compare
5e87689
to
9fd7f26
Compare
|
||
const metricMapFunc = (metric: string | AdhocMetric) => { | ||
if (metric.hasOwnProperty('label')) { | ||
return (metric as AdhocMetric).label; |
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.
I think we already have a util getMetricLabel
for that
SUMMARY
When a y axis sort is selected with a stacked bar chart with totals shown, the y axis column value was being added to the total. This pr checks that only the metrics are being used in calculating totals by passing in the list of metrics labels to the total calculation function, and only totaling the columns that are metrics, not the ones used in sorting.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
TESTING INSTRUCTIONS
Create a chart with one metric, and a sort value. Turn on stacked and show values. The sort value column should not be added to the total of the metric.
ADDITIONAL INFORMATION