Dashboard Graph One Day Behind

Also, there is one more thing: the numbers at the top of the chart are actually correct.

Maybe it’s related to whether the invoices are marked as sent or not?

In my case there are paid invoices, it would be impossible for the chart to show zero for Mar 2017.

Do you see the March invoices in the day\week views?

Yes, but the day and week views are rather useless to me. I’d rather keep tabs on a month to month basis.

Still, for the day view for instance, when viewing data from the last month, the last day of the month shows zero even though there are invoices and payments on that day.

http://prntscr.com/en1mly
http://prntscr.com/en1n5m
http://prntscr.com/en1nhi

Here’s one more thing about this bug.

Today is April 1st, and right now it’s 8:23am in Brazil. I thought Invoice Ninja would today display the graph correctly (because March has just ended), but still it doesn’t. Viewing the THIS YEAR graph it shows March as having one invoice that’s been sent today (April 1st).

If I set period from March 1 to March 31, graph will show everything as being on February, and nothing on March.

What do you have set for ‘First Month of the Year’ on /settings/localization

January.

Thanks, I think I see the problem. I’ve checked in a fix:

https://github.com/invoiceninja/invoiceninja/commit/b7cd7c9bff9e3ebeffdfe00e5bdfa077c9b5c971

I think it’s related to this:

http://stackoverflow.com/questions/7556591/javascript-date-object-always-one-day-off

That’s it! I implemented the change, now it is working as expected!

However something else came up: it’ll add a future period to the date range. Eg: if I view the LAST YEAR chart, it will show from Jan 2016 to Jan 2017, with correct values from Jan 2016 to Dec 2016 and zero in Jan 2017. Same with THIS YEAR, it will show correct values from Jan to Apr and add May 2017 with zero.

All of these are being visualized in the MONTH view. I really don’t have an use for DAYS or WEEKS views.

Also when I choose the LAST MONTH period (with MONTH view) it’ll correctly show data from March, and in April it will show the only payment I received so far, but no invoices (there are several already).

Thanks for the support Hillel, and thanks for such great software!

I’m not sure, I’m not seeing the problem.

It sounds like it could be another timezone issue.

Yeah, it looks like it could really be a timezone issue.

Haven’t been looking at the dashboard graph since it’s not a big deal, but just noticed since updating to 3.2.0 that it’s working properly now. Not sure what changed, but I know I didn’t do anything. So, fixed, I guess?

It should be fixed as of v3.2.

I noticed that. Thanks Hillel! Now the dashboard graph is displaying as expected.

Awesome!

Just out of curiosity, what was it? I kept thinking ChartJS was wonky, but never got further than that.

Here’s the fix, the Chart library wasn’t correctly parsing the date format we were using.

https://github.com/invoiceninja/invoiceninja/commit/b7cd7c9bff9e3ebeffdfe00e5bdfa077c9b5c971