Estimados, requiero que los gráficos que se logran con el plugins, al encontrar un cero en la tabla no sea graficado, o por el contrario me indiquen como puedo hacer para que el grafico se corte cuando esta el cero presente o no hay datos para mostrar.
For future reference, please note that we do not speak Spanish, and the only supported language is English, so please translate your future responses.
As for the zero - yeah that is an issue we've been dealing with, because integer and float columns cannot have anything other than numbers in them, the plugin is treating an empty cell as "0"
I can try and help you out, but you have to make some changes in code in file :
/wp-content/plugins/wpdatatables/source/class.wpdatachart.php around line 1631:
case 'int':
$return_data_row[] = (float)$row[$columnKey];
break;
case 'float':
if ($decimalPlaces != -1){
$return_data_row[] = (float)number_format(
(float)($row[$columnKey]),
$decimalPlaces,
'.',
$thousandsSeparator ? '' : '.');
}else {
$return_data_row[] = (float)$row[$columnKey];
}
break;
and replace it with this
case 'int':
if (is_null($row[$columnKey])){
$return_data_row[]=null;
}else{
$return_data_row[] = (float)$row[$columnKey];
}
break;
case 'float':
if ($decimalPlaces != -1){
$return_data_row[] = (float)number_format(
(float)($row[$columnKey]),
$decimalPlaces,
'.',
$thousandsSeparator ? '' : '.');
if (is_null($row[$columnKey])){
$return_data_row[]=null;
}else{
$return_data_row[] = (float)$row[$columnKey];
}
break;
With these changes you will get charts like on the first screenshot below.
If you want to make charts like on screenshot #2 you have to use wpdatachart callbacks and insert that on page where your chart is.
I have followed the steps that he sent me to be able to achieve that the graph does not present null values, which are presented as zeros, but I have not been successful. The question is if you would be willing to enter our site to perform the update, and ask about the cost of this service. From now on, I thank you for your attention.
I can log in, and check, but I'll need you to provide me FTP access credentials and a temporary wp-admin user. Since I can't guarantee I can make this happen, it will be free of charge.
For customization services, we usually charge $50 per hour, but we have too much work on our hands, and we won't have time for custom work, so if this turns out to be a customization service, I'm going to have to direct you to a 3rd party.
When leaving the credentials, please note that this is a public ticket, so make sure to enable the PRIVATE response.
case 'int':
if (is_null($row[$columnKey])){
$return_data_row[]= null;
}else{
$return_data_row[] = (float)$row[$columnKey];
}
break;
case 'float':
if ($decimalPlaces != -1) {
if (is_null($row[$columnKey])) {
$return_data_row[] = null;
}else {
$return_data_row[] = (float)number_format(
(float)($row[$columnKey]),
$decimalPlaces,
'.',
$thousandsSeparator ? '' : '.');
}
} else {
if (is_null($row[$columnKey])) {
$return_data_row[] = null;
}else {
$return_data_row[] = (float)$row[$columnKey];
}
}
break;
But it's still showing 0 values on your charts.
Are those values saved as 0 or as NULL in the database?
Also, try including the callbacks I mentioned before to the page. Since .load is deprecated in the latest version of WordPress, you need to use .on('load',function(), like shown in the example below:
Estimados, requiero que los gráficos que se logran con el plugins, al encontrar un cero en la tabla no sea graficado, o por el contrario me indiquen como puedo hacer para que el grafico se corte cuando esta el cero presente o no hay datos para mostrar.
Gracias.
Hello andres
Thank you for reaching out to us.
For future reference, please note that we do not speak Spanish, and the only supported language is English, so please translate your future responses.
As for the zero - yeah that is an issue we've been dealing with, because integer and float columns cannot have anything other than numbers in them, the plugin is treating an empty cell as "0"
I can try and help you out, but you have to make some changes in code in file :
/wp-content/plugins/wpdatatables/source/class.wpdatachart.php around line 1631:
and replace it with this
With these changes you will get charts like on the first screenshot below.
If you want to make charts like on screenshot #2 you have to use wpdatachart callbacks and insert that on page where your chart is.
One more thing you have to change in this callback number 39 in (wpDataChartsCallbacks[39]) to id of the chart that you use on the page.
This will be overwritten on next update so you have to come back here and do it again.
I hope this helps.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
I have made both updates to my code without success, apparently there is something else that needs to be done.
If you want to review my graph, it is at: https://www.ifop.cl/red-de-monitoreo-cambio-climatico/variables-e-indicadores-c-c/zona-sur-austral/
Hi again Andres
I forgot to mention that you should disable "Use minified wpDataTables Javascript" slider in main settings of wpDataTables/Custom JS and CSS:
And also clear your cookies.
Please try this and let me know if it works.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Dear,
I have followed the steps that he sent me to be able to achieve that the graph does not present null values, which are presented as zeros, but I have not been successful.
The question is if you would be willing to enter our site to perform the update, and ask about the cost of this service.
From now on, I thank you for your attention.
Hello again Andres
I can log in, and check, but I'll need you to provide me FTP access credentials and a temporary wp-admin user. Since I can't guarantee I can make this happen, it will be free of charge.
For customization services, we usually charge $50 per hour, but we have too much work on our hands, and we won't have time for custom work, so if this turns out to be a customization service, I'm going to have to direct you to a 3rd party.
When leaving the credentials, please note that this is a public ticket, so make sure to enable the PRIVATE response.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi again Andres
That helped, thanks.
The code needed here is actually this:
But it's still showing 0 values on your charts.
Are those values saved as 0 or as NULL in the database?
Also, try including the callbacks I mentioned before to the page. Since .load is deprecated in the latest version of WordPress, you need to use .on('load',function(), like shown in the example below:
You have to change in this callback number 39 in (wpDataChartsCallbacks[39]) to id of the chart that you use on the page.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Alexandar,
Solved the problem, thank you very much for your valuable support, and from now on we will recommend the tool.
Great news Andres
Thanks for letting me know
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables