I use the elasticsearch date histogram to group responses over the account over time. A snippet of the date histogram is great for this, but if the interval has no answers that fall into it, it does not appear in json. I decided that the best way to deal with this is to use javascript to fill in the gaps in the graphics library. (ideally, in highcharts, but d3 or something else is possible). Months seem pretty easy, but it gets complicated when I need to do this both week and day. Mostly my problem:
{ date: April: 5, count: 5 }, { date: June, count: 10 }
should be more like
{ date: April: 5, count: 5 }, {date: May, count: null }, { date: June, count: 10 }
source share