Skip to content

fix unordered dates in RDV by status stats chart

Vincent Agnano requested to merge fix/stats-rdv-by-status-chart into master

Created by: adipasquale

https://trello.com/c/gip22Gtx/1096-page-stats-bug-affichage-dates-graphiques-par-statut-de-rdvs

stitched_2020_09_24-15_18_45

good catch @guillett ! took me a while to figure it out. chartkick doesn't do date ordering because they don't want to handle parsing dates, which makes sense. The problem actually originated from my hacky script that normalizes the data over 100%. I first excluded values with 0 to avoid dividing by 0, but this was the root of the problem. you need to have all dates present for all bins, otherwise they won't be ordered correctly.

hard to validate on the review app without prod data 🤷 but I checked locally with a prod dump

Merge request reports

Loading