-
Notifications
You must be signed in to change notification settings - Fork 196
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
How to get every group column total #63
Comments
Sorry, but I'm not sure what you mean. Do you use I didn't used For example, if I understand you correctly, you want to have total on every level of y-grouping. So one could define yDimension: [
{ dataName: 'sellyear' }, // no grand total
{ dataName: 'sellmonth', rowTotals: true, rowTotalsText: "Month Total" }
],
rowTotals: false, // no grand total ??? to hold it for backwards compatibility only
rowTotalsText: "Total"// used for grand total ??? to hold it for backwards compatibility only Moreover there exist Finally I personally find the names I think that one should, first of all, to extend the existing options of jqPivot. One should find clear and flexible enough new options and only after that one should make the corresponding changes in the code of jqPivot. |
Yes, I want rowsTotal. This is the result: |
@mrjumpy Probably there are a misunderstanding. The options I pointed to bad chosen existing options: After clearing of the requirements and choosing the names of new options one have to extend the code of jqPivot. |
Ok I got it. So, In the future, we will have the options(rowTotals in yDimension) to set. |
@mrjumpy : I suggest you to discuss what questions are opened in the requirements to jqPivot before I start any implementation. For example please reread your original first post and describe my what you need exactly. The grouping could looks like
or could be like
or like
in case of usage The next question: which place and which form is better to specify the titles? The usage of boolean The next problem: The aggregation function used for Total columns. It will be calculated internally the value using the same aggregation function. So one can use it, but it can be that one need to display another totals. For example one display the number of visitors in month in pivot table, but one need to see the max of the all visitors or even the column name (the month) when it was the maximal number of visitors. I ask you for the input because I never used jqPivot or any other pivot tables in any projects for my customers. It's interesting which input one needs. For example, do you use aggregates with one elements or with multiple aggregates? It was an interesting feature request which I hold in my head. One suggested to display the aggregation functions as dropdown (see here). The user could choose the aggregation function and grouping (or pivot in our case) would calculate and to display the required results. It would allows better to analyse the input data with respect of pivot. One more opened question I asked you before. There are exist Do you use Which callbacks would be be helpful in jqPivot? One can for example add the callback which would be called after the data, colModel and grouping headers of column are generated by pivotSetup, but before the grid or the grouping headers are created. It would allow to modify the column properties (for example to insert a column or to modify some headers) before the grid will be created. Having the callback you would be able to implement your current requirements by writing some code for the callback. I repeat once more the first sentence of my post: I suggest you to discuss what questions are opened in the requirements to jqPivot before I start any implementation. Best regards |
Hi! After posting the last comment I can't stop thinking about the problems. After some time I start changing the code and now I already implemented all described above features. I described the features shortly in the comment to the commit. The features works in all the tests which I made. Please try the features and report bugs if you would find someone. Best regards |
I'm surprising your effective performance.
The fourth options is really that I want it. And, reply your question. |
@mrjumpy : Thank you for the feedback. I will analyse the problem later in details. First of all small fix. Please retry with new sources. |
It's work. |
@mrjumpy : Try the demo which is small modification of youth. Three other demos demonstrates the usage of new features and provides an example with more as one aggregations: I have seen your pull request. Thank you very much! I have some other important things to do now. I will look at the pull request later. |
Looks great!! |
Yes of cause. You can use the demos or modify there in any way. I recommend you to include Font-Awesome CSS and to add cmTemplate: { autoResizable: true },
shrinkToFit: false,
autoresizeOnLoad: true,
autoResizing: { compact: true }, in all the demos to reduce the width of all columns based on the width of content. |
I'm found a bug. |
Sorry, but I'm not sure what are expected results. You use fixed |
I want to sketch a table just like you did , but I can't find out where can I edit. |
Try to use I don't understand what you mean with |
Just try to use rowTotalsText: "{0} {1} {3}" in |
I tried what you said. |
Do you mean that one should create one more grouping level and to place the results of different aggregations on the level below? |
Before I made more changes and add generation of one more grouping level I posted the changes. See the demo. Be careful that I changed a little the values of parameters in the callback function and the parameters of the template. You can use try to use |
Yes, you're right. |
I'm testing some options. |
Could you describe more exactly the problem? I opened the demo, I started to analyse the input data and the results, but I found later that the demo displays two pivots: the second grid will be displayed below. So: could you describe more exactly the problem? |
Sorry for my abstract description. Pivot3 is my expected view. It's correct. And, look at pivot1 and pivot3 yDimension. That is the problem. |
Thank you! I will analyse the problem and will write you later. I want only to post you small common remark about the demos which you use. You made the same errors in all previous demos, which are not important to the described problem, but there are still incorrect:
I would recommend you additionally to replace the option like I will write you later about the main problem which you reported. |
I made more changes in the code of |
Thank you for quick and clean bug fix. Pivot1 is OK, Pivot 3 have some bugs and enhancement. Enhancement: Maybe somebody want to rowTotalsText can be express by two different meaning. |
Thank you for the bug report! I posted the corresponding fixes. Common remark for the demos which you post. Please remove duplicate About the Enhancement: It's already exist in jqPivot. I wrote you before that you can use templates in |
Look at the last commit. The new feature |
After so many pivot features improved. |
First of all you can close the issue if you don't see some clear bugs in group column total. I plan to publish jqGrid 4.9 beta1 in the next days. Directly after that I will apply your pull request together with my changes and write some more pages of documentation and wiki articles. I plan to write more documentation and wiki articles in the next two weeks and then to release jqGrid 4.9 after fixing possible errors which will be reported. |
OK! |
It's not a simple problem. I wrote the method One have to go though Short to say the problem which you describe is not a bug. It's the restriction which exists in the current implementation. There are many other methods of jqGrid which have relatively long list of limitations. It's good to reduce the list, but all the changes required time. I want to concentrate me on publishing jqGrid 4.9 and to hold the enhancements for the next release. I suggest you to post the suggestion as separate issue to be more sure that we don't forget the new feature. |
OK! I got it. Thank you!! |
Just like the option groupSummaryPos : 'footer'. But I want its total for group by column.
Example:
| 2011 | 2014 |
| 7 | "total" | 12 | 7 | "total"|
I want that "total". XD
The text was updated successfully, but these errors were encountered: