Skip to content
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

Add a bottom row that aggregates each metric column for table viz #920

Closed
wants to merge 10 commits into from
Closed

Add a bottom row that aggregates each metric column for table viz #920

wants to merge 10 commits into from

Conversation

yxjames
Copy link
Contributor

@yxjames yxjames commented Aug 11, 2016

In table viz, I add a table footer that shows the sum of metric columns.
The footer can't be sorted to the top.
screen shot 2016-08-10 at 5 59 20 pm

screen shot 2016-08-10 at 5 51 04 pm

@@ -422,6 +422,12 @@ def get_df(self, query_obj=None):
self.form_data.get("granularity") == "all" and
'timestamp' in df):
del df['timestamp']
if not self.form_data.get('all_columns'):
metrics = self.form_data.get('metrics') or ['count']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's something off there as tests fails :)

@coveralls
Copy link

coveralls commented Aug 11, 2016

Coverage Status

Coverage increased (+0.04%) to 81.276% when pulling efd86c8 on joshwalters:sum_table_viz into 198226a on airbnb:master.

@coveralls
Copy link

coveralls commented Aug 11, 2016

Coverage Status

Coverage increased (+0.04%) to 81.276% when pulling efd86c8 on joshwalters:sum_table_viz into 198226a on airbnb:master.

@kkalyan
Copy link
Contributor

kkalyan commented Aug 23, 2016

Thanks @yxjames for addressing #832

@mistercrunch
Copy link
Member

Sorry this never made it in, I'm cleaning up older PRs with merge conflicts at the moment. Please resubmit the PR if you want this feature to make it in.

@tristix
Copy link

tristix commented Sep 28, 2017

+1 for anyone knowledgeable enough to get this in!

@apelliciari
Copy link

+1 this is a nobrain for a data viz tool

@Geoiv
Copy link

Geoiv commented Jan 16, 2020

This is an old PR at this point, but still +1 to the idea. I'm looking through the project to see about implementing it myself, but I may not be knowledgeable enough on the internals of Superset to do so.

@villebro
Copy link
Member

villebro commented Jan 16, 2020

This is a good idea, but I don't think it can be solved on the client side as proposed in this PR, as metrics need to be aggregated on the datasource (think mean, weighted average or other custom aggregation which can't simply be summed up). However, by leveraging the new chart API, this could be done fairly elegantly by issuing two queries in the QueryContext; one for the regular grouped row-by-row results, and a second one with the same metrics, but without grouping, which is displayed at the bottom. Could be an interesting POC.

@bkarlson
Copy link

+1 was shocked to discover this cannot be done.. I sure can add rollup to my query, but the bottom row won't be fixed and won't be rendered bold, bad UX..

@Northern125
Copy link

+1, good idea, and a very much needed feature.

zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 17, 2021
* feat(plugin-chart-echarts): subject Arrange legend and zoom

* fix

* WIP

* Fix

* set zoomable false

* fix tests

* Solve comments

* Add constants

* fix

* fix lint

* fix lint

* fix lint

* snake_case to camelCase

* remove unused property
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 24, 2021
* feat(plugin-chart-echarts): subject Arrange legend and zoom

* fix

* WIP

* Fix

* set zoomable false

* fix tests

* Solve comments

* Add constants

* fix

* fix lint

* fix lint

* fix lint

* snake_case to camelCase

* remove unused property
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 25, 2021
* feat(plugin-chart-echarts): subject Arrange legend and zoom

* fix

* WIP

* Fix

* set zoomable false

* fix tests

* Solve comments

* Add constants

* fix

* fix lint

* fix lint

* fix lint

* snake_case to camelCase

* remove unused property
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 26, 2021
* feat(plugin-chart-echarts): subject Arrange legend and zoom

* fix

* WIP

* Fix

* set zoomable false

* fix tests

* Solve comments

* Add constants

* fix

* fix lint

* fix lint

* fix lint

* snake_case to camelCase

* remove unused property
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.