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 totals= parameter to the [bw_csv] shortcode #32

Open
bobbingwide opened this issue Jan 19, 2020 · 3 comments
Open

Add totals= parameter to the [bw_csv] shortcode #32

bobbingwide opened this issue Jan 19, 2020 · 3 comments
Assignees

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Jan 19, 2020

I want to be able to automatically sum the values in columns in a CSV table and display this in a totals line.
E.g. for this simple table with a totals line for totals=C,T,A It would be would be

A B C
1 2 3
4 5 6
2 7 4.5

Where the codes are

Code Meaning
C Count - i.e number of rows
T Total - sum of the rows in the column
A Average - average of the values in the column ( T / C )
No function

I haven’t decided about requirements when pagination is active.

@bobbingwide
Copy link
Owner Author

This option could also be supported by the oik-bbw/csv block.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 31, 2020

This was released in v1.34.0 on 30 Jan 2020. But it was only applied to the [bw_csv] shortcode. It needs to be added to the oik-bbw/csv block and the [bw_table] shortcode.
I won’t close this issue yet.

@bobbingwide
Copy link
Owner Author

When I added the totals= parameter to oik's [bw_table] shortcode I needed to update the shared library file libs/class-oik-csv-totals.php.

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

1 participant