Is there a way to have Charts ignore empty values? For instance I have a column that may have some blank rows depending on the values of other fields.
I need to ignore those empty fields so that they are not used when creating a chart. (a column with 10 rows, 8 are empty, 2 are populated should only include 2 results in the chart)
Is there a way to have Charts ignore empty values? For instance I have a column that may have some blank rows depending on the values of other fields.
I need to ignore those empty fields so that they are not used when creating a chart. (a column with 10 rows, 8 are empty, 2 are populated should only include 2 results in the chart)
Is this possible?
Hi Matt
Thank you for reaching out to us.
By default, integer and float columns need to have numerical data in them, meaning NULL is not a valid cell value, so it will be replaced by a 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.