nagarajanchinnasamy / subtotal

A JavaScript plugin for PivotTable.js. It renders subtotals of rows and columns with the ability to expand and collapse rows and columns
http://nagarajanchinnasamy.com/subtotal
MIT License
92 stars 46 forks source link

Put Row SubTotals at Bottom Instead of Top #12

Open j8lp opened 8 years ago

j8lp commented 8 years ago

Is there a way we can put the row subtotals at the bottom of its parent row instead of at the top of its parent row. For example: http://nagarajanchinnasamy.com/subtotal/examples/

Is there a way we can get the total number of Female Voters to appear at the bottom of the Female row instead of at the top?

nagarajanchinnasamy commented 8 years ago

Hi, Currently its not possible to put the subtotals as the last row of the parent. I will take this as an enhancement request and if it doesn't impact the performance, I will try to implement it. If implemented, I will make it configurable through an option.

Thanks for the feedback.

Dams591 commented 7 years ago

Hey @nagarajanchinnasamy Any progress on this ? any idea how I could do that easily ? Been trying for quite a long time and I have to say I'm struggling. Also any idea how to not display subtotals when expanding ? Thanks. Damien.

Dams591 commented 7 years ago

To me the secret is inside buildRowHeaders, but can't modify it easily.

nagarajanchinnasamy commented 7 years ago

Hiding subtotals when expanding is addressed in #26

nagarajanchinnasamy commented 7 years ago

@j8lp @Dams591 When I started writing this plugin, unknowingly :( I have made a strong assumption that the subtotal row goes on top. This will need major refactoring of the code.

I will keep this in my TODO list definitely. But will need more time.

nagarajanchinnasamy commented 7 years ago

As @Dams591 put it rightly, the secret is in buildRowHeaders. But it shouldn't be that difficult :)

One of you want to give it a try? Otherwise, i will come to this after completing work on "Hide On Expand" feature.

Dams591 commented 7 years ago

I'm still integrating the hide on expand into my solution, since I have the multiple values on and some other things I'm having a tough time but I'm getting there. Once I have it I'll give it a try. Let me come back to you in 2-3 days.

nagarajanchinnasamy commented 7 years ago

I guess, we just need to alter the way recursion is done. No other changes may be needed.... hopefully :)

nagarajanchinnasamy commented 7 years ago

Just played around changing the method of recursion. It does not help. It is tough!!!

nagarajanchinnasamy commented 7 years ago

Points to remember are:

So, the secret is in buildRowHeaders, collapseRow and expandRow functions :)

Kishan1824 commented 7 years ago

Repsected

I just tried to modified buildRowHeaders function to bind subtotal below the row, but nothing happened. So please try on that to resolve this issue.

Thanks

Kishan1824 commented 7 years ago

Respected

Is there any way to display sub-total below the row. If possible then please suggest.

Waiting for positive reply.

Thanks

Dams591 commented 7 years ago

Hey @nagarajanchinnasamy
Did you have the time to work on this ? Still can't figure it out :(

nagarajanchinnasamy commented 7 years ago

Sorry for the delayed response. I am working on it. Scheduled for release v1.11.0.. May take couple of more weeks minimum.

hkbeer commented 7 years ago

Yes please create this Subtotal at the bottom option. It is very important. Thanks

nagarajanchinnasamy commented 7 years ago

Column Collapsing, Row collapsing and showing row subtotals at the bottom implemented. Please check latest v1-11.0 branch. Pending: Row expansion when displaying subtotals at the bottom.

Am using examples/210_collapse_rowscols.html to test and debug.

Kishan1824 commented 7 years ago

Dear Sir

I have tested your updated version of subtotal.js for displaying row subtotal in below portion of row. Its working but now my subtotal for column is not working properly after this update.

Please check attached files as error in my case. Waiting for positive reply.

On Sat, Sep 30, 2017 at 9:38 PM, Nagarajan Chinnasamy < notifications@github.com> wrote:

Column Collapsing, Row collapsing and showing row subtotals at the bottom implemented. Please check latest v1-11.0 branch https://github.com/nagarajanchinnasamy/pivottable-subtotal-renderer/tree/v1-11.0. Pending: Row expansion when displaying subtotals at the bottom.

Am using examples/210_collapse_rowscols.html https://github.com/nagarajanchinnasamy/pivottable-subtotal-renderer/blob/v1-11.0/examples/210_collapse_rowscols.html to test and debug.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nagarajanchinnasamy/pivottable-subtotal-renderer/issues/12#issuecomment-333318365, or mute the thread https://github.com/notifications/unsubscribe-auth/AS5TBPYPSOWvxOVe9LJg6CrcToI_D1f2ks5snmdygaJpZM4KCSPG .

nagarajanchinnasamy commented 6 years ago

@KishanManali1824 and friends,

Please check the latest version at v1-11.0 branch. I will merge this branch into master after your confirmation.

Thanks :)

Kishan1824 commented 6 years ago

Respected

Let me check it. Reply you back.

Thanks for updation.

On Nov 26, 2017 5:07 PM, "Nagarajan Chinnasamy" notifications@github.com wrote:

@KishanManali1824 https://github.com/kishanmanali1824 and friends,

Please check the latest version at v1-10.0 branch. I will merge this branch into master after your confirmation.

Thanks :)

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nagarajanchinnasamy/pivottable-subtotal-renderer/issues/12#issuecomment-347002383, or mute the thread https://github.com/notifications/unsubscribe-auth/AS5TBNhR-E6SCXGrq6_lGiaU19vuL_SQks5s6U19gaJpZM4KCSPG .

Kishan1824 commented 6 years ago

Respected @nagarajanchinnasamy

Its working fine for Row Sub-Total Display Below Property. Thanks for great work. Now can i achieve this below requirement in same updation. Please check my below issue.

I want demo1.png image report type Row & Column Sub-Total Label in our new demo2.png report. Please check both images. demo1 demo2

Kishan1824 commented 6 years ago

Respected @nagarajanchinnasamy

I found one issue in updation. See my attachment. Waiting for reply. demo3

nagarajanchinnasamy commented 6 years ago

@KishanManali1824 Thanks for testing :)

Thats not an issue. Its an enhancement implemented to show the details in the same line when the number of children is one. In your case, RAIL has only one child NORTH. So, the details of NORTH and RAIL will be same. Instead of repeating the same details for RAIL and NORTH, we now show the details in one single row. Hope that explains.

Kishan1824 commented 6 years ago

Respected

Thats ok,now can we achieve that Row-Sub-Total & Column-Sub-Total Header Label as i described before on github?.

On Mon, Nov 27, 2017 at 6:14 PM, Nagarajan Chinnasamy < notifications@github.com> wrote:

@KishanManali1824 https://github.com/kishanmanali1824 Thanks for testing :)

Thats not an issue. Its an enhancement implemented to show the details in the same line when the number of children is one. In your case, RAIL has only one child NORTH. So, the details of NORTH and RAIL will be same. Instead of repeating the same details for RAIL and NORTH, we now show the details in one single row. Hope that explains.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nagarajanchinnasamy/pivottable-subtotal-renderer/issues/12#issuecomment-347171326, or mute the thread https://github.com/notifications/unsubscribe-auth/AS5TBKv-Bp0OxYwEl59UXWgXVdjZ6-blks5s6q7CgaJpZM4KCSPG .

nagarajanchinnasamy commented 6 years ago

@KishanManali1824

Thats not addressed in this version. Please create a new issue to track it separately.

One small request :) Please feel free to address me as @nagarajanchinnasamy πŸ‘

Kishan1824 commented 6 years ago

@nagarajanchinnasamy https://github.com/nagarajanchinnasamy

Ok.I have created new issue related to Row Sub-Total Header Label implementation on github. refer link : https://github.com/nagarajanchinnasamy/pivottable-subtotal-renderer/issues/53

Waiting for positive reply.

On Wed, Nov 29, 2017 at 2:24 AM, Nagarajan Chinnasamy < notifications@github.com> wrote:

@KishanManali1824 https://github.com/kishanmanali1824

Thats not addressed in this version. Please create a new issue to track it separately.

One small request :) Please feel free to address me as @nagarajanchinnasamy https://github.com/nagarajanchinnasamy πŸ‘

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nagarajanchinnasamy/pivottable-subtotal-renderer/issues/12#issuecomment-347660332, or mute the thread https://github.com/notifications/unsubscribe-auth/AS5TBBSAxNSAKjvKVxRcCVErwL4ScG2Eks5s7HMRgaJpZM4KCSPG .

Kishan1824 commented 6 years ago

@nagarajanchinnasamy

I want to show the row sub-total when the number of children is one. Currently when children is one then that row sub-total not coming.

Please help as needed. Waiting for positive reply.

On Nov 27, 2017 6:14 PM, "Nagarajan Chinnasamy" notifications@github.com wrote:

@KishanManali1824 https://github.com/kishanmanali1824 Thanks for testing :)

Thats not an issue. Its an enhancement implemented to show the details in the same line when the number of children is one. In your case, RAIL has only one child NORTH. So, the details of NORTH and RAIL will be same. Instead of repeating the same details for RAIL and NORTH, we now show the details in one single row. Hope that explains.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nagarajanchinnasamy/pivottable-subtotal-renderer/issues/12#issuecomment-347171326, or mute the thread https://github.com/notifications/unsubscribe-auth/AS5TBKv-Bp0OxYwEl59UXWgXVdjZ6-blks5s6q7CgaJpZM4KCSPG .

nagarajanchinnasamy commented 6 years ago

@KishanManali1824

In the latest v1.11.0-alpha.0 release now we show subtotal when a parent number of children is 1. Please check and let me know if there are any issues.

Thanks for your feedback πŸ‘

Kishan1824 commented 6 years ago

Hey @nagarajanchinnasamy https://github.com/nagarajanchinnasamy

Its working fine.Thanks for updation. You are working like champ😎.

One small request can we export the same pivot html wihout those expand/collapse icon in excel. I have already done it but some issue's going. can u help in it.

Waiting for positive reply.

On Thu, Dec 7, 2017 at 12:29 PM, Nagarajan Chinnasamy < notifications@github.com> wrote:

@KishanManali1824 https://github.com/kishanmanali1824

In the latest v1.11.0-alpha.0 release https://github.com/nagarajanchinnasamy/subtotal/releases/tag/v1.11.0-alpha.0 now we show subtotal when a parent number of children is 1. Please check and let me know if there are any issues.

Thanks for your feedback πŸ‘

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nagarajanchinnasamy/subtotal/issues/12#issuecomment-349880552, or mute the thread https://github.com/notifications/unsubscribe-auth/AS5TBH8SfA7vrom12nPjSQ-D6K92rbe3ks5s94zOgaJpZM4KCSPG .

nagarajanchinnasamy commented 6 years ago

Pls create a separate issue regarding download. Thanks :-)

Kishan1824 commented 6 years ago

OK. i will create a separate issue for that. Also created another issue regarding sub-total header label.

Check & confirm. Waiting for positive reply.

On Fri, Dec 8, 2017 at 3:06 AM, Nagarajan Chinnasamy < notifications@github.com> wrote:

Pls create a separate issue regarding download. Thanks :-)

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nagarajanchinnasamy/subtotal/issues/12#issuecomment-350101590, or mute the thread https://github.com/notifications/unsubscribe-auth/AS5TBIDvC3wS6vjWZiBwVqsGyvq-hJbUks5s-FpVgaJpZM4KCSPG .

Kishan1824 commented 6 years ago

Respected

Please refer both this two link:

https://github.com/nagarajanchinnasamy/subtotal/issues/53 https://github.com/nagarajanchinnasamy/subtotal/issues/55

On Fri, Dec 8, 2017 at 10:00 AM, Kishan Kadam kishanskadam@gmail.com wrote:

OK. i will create a separate issue for that. Also created another issue regarding sub-total header label.

Check & confirm. Waiting for positive reply.

On Fri, Dec 8, 2017 at 3:06 AM, Nagarajan Chinnasamy < notifications@github.com> wrote:

Pls create a separate issue regarding download. Thanks :-)

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nagarajanchinnasamy/subtotal/issues/12#issuecomment-350101590, or mute the thread https://github.com/notifications/unsubscribe-auth/AS5TBIDvC3wS6vjWZiBwVqsGyvq-hJbUks5s-FpVgaJpZM4KCSPG .