ericc44
Forum Replies Created
-
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Create Charts from TablePressHi Veloctyceo,
you can using Chartist.js, this TablePress Extension creates a responsive chart based on the data in a TablePress table.
linkBest regards
EricForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Embedding table into an emailHi Tobias,
is it possible to test this addon to send an email ?Thanks WPChina for your addon, best regards.
Best wishes,
EricForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Embedding table into an emailHi WPChina and Tobias.
Thank you for your support.Sorry, but actualy when we using EXCEL Button : we saving table to an Excel (.xlsx) file to local user machine.
I just want a new button to save this Excel (.xlsx) file to a fix email adress or web server or other…
We want to offer the user the possibility of recording his result to a centralized place to make statistics of the choices of the different users.Is it possible ?
Thanks
Best regardsForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Embedding table into an emailHi WPChina and Tobias,
i want to send Embedding Excel table into an email. Have you a solution ?
I want to use a button and sending table at excel format to a fix email adress.
ScreenPictureThanks
Best regards
EricForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] AUTOSUMHi,
Thanks Tobias it is true.Note : first column number is 0
This code is correct and should sum all column 1 (column number 2 of your table) and add text ‘Totals :’ in your column 2 (column number 3 of your table).
Can you check you have only number in column 1 ?Can you put a table link to check, please.
Best regards
EricForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] AUTOSUMHi,
if you want to use SUM just the visible rows which have been filtered, it necessary to add a Table Footer
You should add a new row to the end of the table and click the “Table Footer” row as well.
and you can see
Sum of columnBest regards
EricHi,
to have Round a number to the nearest integer:
just replace this code
$( api.column(1 ).footer() ).html( total );
to
$( api.column(1 ).footer() ).html( Math.round(total ));
To have only two decimals
just replace this code
$( api.column(1 ).footer() ).html( total );
to
$( api.column(1 ).footer() ).html( total.toFixed(2));
P.S.: In case you haven’t to TOBIAS, please rate TablePress here in the plugin directory.
Thanks!Have a good day
Best regards
EricHi,
1- In addition, your table does not have a table footer. You should add a new row to the end of the table and click the “Table Footer” row as well.2- Paste this code to “Custom Commands” textfield without CR LF
"footerCallback": function( row, data, start, end, display ) { var api = this.api(), data; var intVal = function ( i ) { return typeof i === 'string' ? i.replace(/[\$,]/g, '')*1 : typeof i === 'number' ? i : 0; }; total = api .column( 1, { page: 'current'} ) .data() .reduce( function (a, b) { return intVal(a) + intVal(b); }, 0 ); $( api.column(1 ).footer() ).html( total ); $( api.column( 0 ).footer() ).html('Total :'); }
Note : first column number is 0Best regards
EricForum: Plugins
In reply to: [TablePress Extension: Chartist] Using data footer line for PiepercentHi Silsha,
thank you for a solution.
Just more information :
– Yes I want the first row of table as label ‘table_head’, that now is OK
– and the last row (Footer) as value for PiePercent chart ‘table_footer’
but i add the footer data to Tablepress with
"dom": "WBlfirtip", "footerCallback": function( row, data, start, end, display ) { var api = this.api(), data; var intVal = function ( i ) { return typeof i === 'string' ? i.replace(/[\$,]/g, '')*1 : typeof i === 'number' ? i : 0; }; totalModele = api .column( 3, { page: 'current'} ) .data() .reduce( function (a, b) { return intVal(a) + intVal(b); }, 0 ); totalListe = api.column( 4, { page: 'current'} ).data().reduce( function (a, b) { return intVal(a) + intVal(b); }, 0 ); totalValeur2 = api .column( 5, { page: 'current'} ) .data() .reduce( function (a, b) { return intVal(a) + intVal(b); }, 0 ); $( api.column(3 ).footer() ).html( totalModele ); $( api.column(4 ).footer() ).html( totalListe ); $( api.column(5 ).footer() ).html( totalValeur2 ); $( api.column( 2 ).footer() ).html('Total'); }
Another suggest is it possible to have information over the mousse pointer like GoogleChart Displays tooltips when hovering over slices.
GoogleChart
Displays tooltips when hovering over slices.Or is it possible to use data TablePress with GoogleChatrs function ?
Thanks
Best regards
EricHi Tobias,
good news, to have dynamic function for current page just add{ page: 'current'
changetotal = api.column( 4 ).data()
tototal = api.column( 4, { page: 'current'} ).data()
Is it possible to have code to paste it into the “Custom Commands” textfield to load an external JavaScript file code ?
Because it more easy to read and to add comment that single line.Thanks for all
Best regardsOK for comma, sorry i have tested with ; and {}
How i can modified code to have dynamic function like DatatableThank you very much
RegardsForum: Plugins
In reply to: [TablePress Extension: Chartist] Disable diplay for 0% valuesThank you very much Silsha.
It is ok for color and can you tell me when you have a solution for option to hide labels for values below x.Best regards
EricGreat work TOBIAS, thank you very much.
1) I’m surprised, sum isn’t dynamic, if you select a value filter the sum don’t change. Is it possible to have dynamic function ?
https://prnt.sc/fy6jvu
Test32) I use this code
"dom": "WBlfirtip"
to “Custom Commands” textfield to display Button and filter like TEST2
How i can add this code with “footerCallback”: function3) Is it possible to have sum for all column, what code modification ?
Thanks
Best regards
EricHi Tobias,
thank you for your help.
I have created two pages TEST2 and Test3 with same informations just TABLE are different : Test2 have [table id=2] and TEST3 have [table id=3]I just copy this code to “Custom Commands” textfield without CR LF to [table id=3]
"footerCallback": function ( row, data, start, end, display ) { var api = this.api(), data; total = api .column( 5 ) .data() .reduce( function (a, b) { return intVal(a) + intVal(b); }, 0 ); $( api.column( 5 ).footer() ).html( total +' total)' ); }
When i use this code filter menu don’t work.
I don’t have text value “Total” + value display on footer on column 5.Thanks
EricHI,
i have update the code source"footerCallback": function ( row, data, start, end, display ) { var api = this.api(), data; /* Total over all pages */ total = api .column( 5 ) .data() .reduce( function (a, b) { return intVal(a) + intVal(b); }, 0 ); /* Update footer */ $( api.column( 5 ).footer() ).html( total +' total)' ); } );
I copy this code to “Custom Commands” textfield without CR LF
"footerCallback": function ( row, data, start, end, display ) { var api = this.api(), data; total = api .column( 5 ) .data() .reduce( function (a, b) { return intVal(a) + intVal(b); }, 0 ); $( api.column( 5 ).footer() ).html( total +' total)' ); } );
But i don’t have text value “Total” + value display on footer.
Where is the problem ?
Please
Thanks
Eric