I now see what’s wrong:
You’re counting months with your custom query function backwards:
<?php echo date("M",strtotime("-1 Months")) ?>
<?php echo date("M",strtotime("-0 Months")) ?>
and get this result (from source viewer in js function):
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Month', 'Total'],
['Jul', 0],
['Aug', 0],
['Oct', 0],
['Oct', 0],
['Dec', 0],
['Dec', 0],
['Jan', 0],
['Mar', 0],
['Mar', 0],
['May', 0],
['May', 0],
['Jul', 50.34],
['Jul', 50.34]
]);
This issue only occurs on the last day of months that have 31 days. It is a known PHP issue…
If you wish to contribute to this plugin you can simply fork it on github and then commit a pull request with your improvents: https://github.com/aristath/MarketPress-Statistics
P.S. I know it needs a complete rewrite… I just haven’t had the time to do it yet. 🙂
Well, I’ve read on php.net about strtotime and they state it is not a bug, just we need a different function for that.
Today I see everything is fine with the charts 🙂
yeah… I need to completely rewrite the plugin to offer custom reports and fix some minor things like this one.