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

Give label for Subtotal #14

Closed
zam6ak opened this issue Nov 3, 2016 · 10 comments
Closed

Give label for Subtotal #14

zam6ak opened this issue Nov 3, 2016 · 10 comments

Comments

@zam6ak
Copy link

zam6ak commented Nov 3, 2016

Is it possible to give a label for the subtotals row?

In your example:
http://nagarajanchinnasamy.com/subtotal/examples/subtotal_pivot.html

if you expand on Gender, the top cell for Procince (subtotal) is blank.
It would be nice if it could automatically put in "Subtotal for Province"
Perhaps via config option or something....

@nagarajanchinnasamy
Copy link
Owner

@zam6ak If I am right, you are referring to the highlighted cell in the attached image.

Sure, we can add a title text instead of keeping it empty. I will take this as an enhancement.

Just one clarification though: That highlighted cell's row is the subtotal row for Female. Not for Province.
subtotalrowheader

@zwirnerj
Copy link

zwirnerj commented Nov 7, 2016

@zam6ak maybe it helps if you just add:
table.pvtTable .pvtRowLabel {vertical-align: top;}
to your css file. After that the "female" label is on top next to the subtotal.
There are a lot of things that can be done to fit your needs just by adjustment of CSS:
example

@zam6ak
Copy link
Author

zam6ak commented Nov 7, 2016

@nagarajanchinnasamy You are correct, it is for Female. I think it would be nice to add this via config option and if enabled it would just put text "Totals for {{colOrRowName}}" Also, perhaps, this makes sense only when item is expanded?

@zwirnerj this is not the same as having a label....I do think this CSS should be default though. It helps a lot

@nagarajanchinnasamy
Copy link
Owner

nagarajanchinnasamy commented Nov 17, 2016

Thanks @zwirnerj ... Nice idea :)

Along with what @zwirnerj has suggested, you can highlight the subtotal row with a different background color as shown in one of the examples. I think that will be more elegant without adding more text into the table.

@zam6ak I get your point too.... Please try above suggestions and let us know. Implementation wise it should not be very difficult to add what you are suggesting... but would like to hear from you after you have tried the options suggested. Thanks :)

@zam6ak
Copy link
Author

zam6ak commented Nov 17, 2016

@nagarajanchinnasamy I added the style that @zwirnerj suggested. It looks better, but I wish there was a way to change the background color of the subtotals row but only row when expanded.
I think that would ultimately do it.

@nagarajanchinnasamy
Copy link
Owner

nagarajanchinnasamy commented Nov 17, 2016

Did you check this example at:

http://nagarajanchinnasamy.com/subtotal/examples/subtotal_pivot_css.html

Does that help?

@ilyaguy
Copy link

ilyaguy commented Nov 17, 2016

I've used following styles

            table.pvtTable .pvtRowLabel {vertical-align: top;}
            .pvtRowSubtotal.rowcol0, .pvtColSubtotal.colcol0 {
                background-color: #EFEFEF !important;
                font-size: 1.3em;
                font-weight:bold;
            }
            .pvtRowSubtotal.rowcol1, .pvtColSubtotal.colcol1 {
                background-color: #EFEFEF !important;
                font-size: 1.2em;
                font-weight:bold;
            }
            .pvtRowSubtotal.rowcol2, .pvtColSubtotal.colcol2 {
                background-color: #EFEFEF !important;
                font-size: 1.1em;
                font-weight:bold;
            }
            .pvtRowSubtotal {
                background-color: #EFEFEF !important;
                font-weight:bold;
            }

and result is:
screen shot 2016-11-18 at 01 30 02

@zam6ak
Copy link
Author

zam6ak commented Nov 28, 2016

@ilyaguy After applying your styles I realized that background color completely wipes out effects of Heatmap renderer....

@nagarajanchinnasamy
Copy link
Owner

nagarajanchinnasamy commented Dec 7, 2016

@zam6ak hope styling collapsable labels #20 will be able to meet your requirement!!!???

@nagarajanchinnasamy
Copy link
Owner

Will take this forward with #20 styling collapsible labels. Closing this for now.

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

No branches or pull requests

4 participants