目前我有这个:
<div id="chartContainer">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://dimplejs.org/dist/dimple.v1.min.js"></script>
<script type="text/javascript">
var svg = dimple.newSvg("#chartContainer", 590, 400);
var data = [
{'Date': '01-03-2013', 'Views': '13'},
{'Date': '05-03-2013', 'Views': '123'},
{'Date': '09-03-2013', 'Views': '234'},
{'Date': '13-03-2013', 'Views': '95'},
];
/*
var data = [
{'Date': '01-03-2013 - 02-03-2013', 'Views': '13'},
{'Date': '05-03-2013 - 06-03-2013', 'Views': '123'},
{'Date': '09-03-2013 - 10-03-2013', 'Views': '234'},
{'Date': '13-03-2013 - 14-03-2013', 'Views': '95'},
]; */
var myChart = new dimple.chart(svg, data);
myChart.setBounds(70, 30, 490, 310)
var x = myChart.addTimeAxis("x", "Date", "%d-%m-%Y", "%d-%m");
x.showGridlines = true;
x.addOrderRule("Date");
var y = myChart.addMeasureAxis("y", "Views");
y.tickFormat = "d";
var s = myChart.addSeries(null, dimple.plot.line);
s.lineWeight = 4;
s.lineMarkers = true;
myChart.draw();
</script>
</div>
演示:jsfiddle
我应该怎么做才能让 dimple.js/d3.js 与范围日期的注释数据一起正常工作?