我采用了以下d3js示例:
并且稍微修改了数据。相关的修改代码是:
var data = [
{"date":"01-May-2000","close":"100"},
{"date":"30-Apr-2012","close":"200"},
{"date":"27-Apr-2012","close":"300"},
{"date":"26-Apr-2012","close":"400"},
{"date":"25-Apr-2012","close":"500"},
{"date":"16-Mar-2012","close":"600"},
{"date":"15-Mar-2012","close":"500"},
{"date":"14-Mar-2012","close":"400"},
{"date":"13-Mar-2012","close":"300"},
{"date":"12-Mar-2012","close":"200"},
{"date":"12-Mar-2012","close":"100"}
];
var parseDate = d3.time.format("%d-%b-%Y").parse;
第一个和第二个时间戳的差异是〜12年。所有其他数据点看起来都很紧迫那是一个错误吗?或者我该怎么办才能在图表末尾按下最后的数据点?
Here is an example with jsfiddle
干杯 强尼
答案 0 :(得分:1)