I have a products model and an iTunes sales model. At the moment i'm fairly successfully reporting sales through scopes and ordered hashes. One flaw in the approach i've taken is that if there's no sales for a particular date I don't get a zero entry, just a gap for that date, which proves to be an issue when using something like Highcharts to plot the results.
I'm also soon to add new models for sales data from other sources, which will mean a rewrite to pull these figures into the product view and with my current approach I can see this being a complete headache when one report contains sales for a date but another doesn't.
I'm thinking I should instead for any given product be producing a range of dates (last 30 days for example) and then for those dates bring in the associated sales from my iTunes and other sales models. I'm just not sure how to approach this or if this is even the best approach to take.
Does anyone have experience of building something similar that can offer some guidance here please?
Thanks in advance!