I can't think of a smooth way to do this but I've written some custom code which works with your example and can hopefully work with your real case.
var svg = dimple.newSvg("#chartContainer", 600, 400),
data = [
{ date : '2013-12-08 12:12', fruit : 'apples', count : 2 },
{ date : '2013-12-08 12:12', fruit : 'oranges', count : 5 },
{ date : '2013-12-09 16:37', fruit : 'apples', count : 1 },
{ date : '2013-12-10 11:05', fruit : 'apples', count : 6 },
{ date : '2013-12-10 11:05', fruit : 'oranges', count : 2 },
{ date : '2013-12-10 20:21', fruit : 'oranges', count : 1 }
],
lastDate = {},
filledData = [],
dayLength = 86400000,
formatter = d3.time.format("%Y-%m-%d %H:%M");
// The logic below requires the data to be ordered by date
data.sort(function(a, b) {
return formatter.parse(a.date) - formatter.parse(b.date);
});
// Iterate the data to find and fill gaps
data.forEach(function (d) {
// Work from midday (this could easily be changed to midnight)
var noon = formatter.parse(d.date).setHours(12, 0, 0, 0);
// If the series value is not in the dictionary add it
if (lastDate[d.fruit] === undefined) {
lastDate[d.fruit] = formatter.parse(data[0].date).setHours(12, 0, 0, 0);
}
// Calculate the days since the last occurance of the series value and fill
// with a line for each missing day
for (var i = 1; i <= (noon - lastDate[d.fruit]) / dayLength - 1; i++) {
filledData.push({
date : formatter(new Date(lastDate[d.fruit] + (i * dayLength))),
fruit : d.fruit,
count : 0 });
}
// update the dictionary of last dates
lastDate[d.fruit] = noon;
// push to a new data array
filledData.push(d);
}, this);
// Configure a dimple line chart to display the data
var chart = new dimple.chart(svg, filledData),
x = chart.addTimeAxis("x", "date", "%Y-%m-%d %H:%M", "%Y-%m-%d"),
y = chart.addMeasureAxis("y", "count"),
s = chart.addSeries("fruit", dimple.plot.line);
s.lineMarkers = true;
chart.draw();
You can see this working in a fiddle here: