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

Hide Column and Row Totals #500

Closed
riaano opened this issue Jun 10, 2016 · 14 comments
Closed

Hide Column and Row Totals #500

riaano opened this issue Jun 10, 2016 · 14 comments

Comments

@riaano
Copy link

riaano commented Jun 10, 2016

Can I request that we add functionality to allow us to either hide the right column total or the bottom row total or both.

I have a scenario where I'm showing data over months and for reporting don't need the column to the right

@XavierFlo
Copy link

I used this to hide totals

$("#Output").pivotUI({
.
.
onRefresh: function(config) {
//$("#output").find('select').addClass('hidden');
$("#output").find('.rowTotal').addClass('hidden');
$("#output").find('.colTotal').addClass('hidden');
$("#output").find('.pvtGrandTotal').addClass('hidden');
$("#output").find('.pvtTotalLabel').addClass('hidden');
},
.
.
});

@nicolaskruchten
Copy link
Owner

@riaano
Copy link
Author

riaano commented Jul 18, 2016

This works if you want to hide all the totals, but does not work if you want to only hide the column totals and its header. It will hide the total, but not the header and if you want to hide the headerLabel it hides the Label for the bottom (row) as well.

Can a different solution be provided

@nicolaskruchten
Copy link
Owner

@riaano have you checked the answer in the FAQ?

@riaano
Copy link
Author

riaano commented Jul 18, 2016

Yes the answer in the FAQ does not work for this scenario I mentioned. This is why I made the comment earlier.

@nicolaskruchten
Copy link
Owner

@riaano can you please create a new issue for this indicating your desired output and I'll try to help?

@riaano
Copy link
Author

riaano commented Aug 15, 2016

Hide Column and Row Totals #538

@anu87
Copy link

anu87 commented Dec 8, 2016

How can I do this R Shiny? I am not sure how I can access the CSS file for my app? Or do I create one?

@nicolaskruchten
Copy link
Owner

@anu87 the R integration to this Javascript library is mediated by another package (https://github.com/smartinsightsfromdata/rpivotTable) so you would have to direct your question to the maintainer of that package...

@anu87
Copy link

anu87 commented Dec 8, 2016

Thanks!

@smartinsightsfromdata
Copy link

@XavierFlo I tried your method but it didn't work for me.

Would you mind to publish a jfiddle for it?

I'm trying to see if rpivotTable could handle this programmatically, to address @anu87 request.

@tsando
Copy link

tsando commented Mar 13, 2017

@nicolaskruchten Can you please put an example on how to do this using the 'official solution'? I couldn't do this using jQuery and css. I could only get it to work using the solution from @XavierFlo above. Thanks!

@nicolaskruchten
Copy link
Owner

@tsando the official solution is in the FAQ here: https://github.com/nicolaskruchten/pivottable/wiki/Frequently-Asked-Questions#totals

if that's not working for you, please create a new issue describing what you want to do rather than posting on an old, closed one :)

@tsando
Copy link

tsando commented Feb 9, 2018

@nicolaskruchten can you please show how the official solution would be written inside the $(target).pivotUI(...) function? i.e without editing my .css file? The official solution says with the following css .pvtTotal, .pvtTotalLabel, .pvtGrandTotal {display: none} but how would this be passed into the $(target).pivotUI(...) function? Thanks.

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

No branches or pull requests

6 participants