Hi DynamicWeb,
Commerce dashboard widgets such as “Completed orders per day” build chart labels from the current month, but build the comparison data from the previous month without normalizing the number of days or filling missing dates with zeroes. This causes misaligned or incorrect chart data when comparing months with different day counts, e.g. June vs May or March vs February.
Additionally, the SQL date range uses <= against a date value representing the last day at midnight, which may exclude orders placed later on the last day of the month.
Expected:
Both “this month” and “last month” series should align with the same day labels, so a solution could be to always display 31 days in the chart.
Actual:
The chart can produce mismatched data lengths and/or omit data from the last day of the month.
Relevant files:
Dynamicweb.Ecommerce.UI/Dashboard/Widgets/CompletedOrdersPerDayChartWidget.cs
Dynamicweb.Ecommerce.UI/Dashboard/Widgets/OrderDataChartWidgetBase.cs
Best regards, Anders