【发布时间】:2017-07-03 07:54:13
【问题描述】:
这类似于here 报告的问题。
在这个工作example 的示例中,我实现了一个折线图和一个历史图表。
chart.xAxis
.showMaxMin(true)
.tickFormat(function(d) { return d3.time.format('%b %d')(new Date(d)) })
一切都按预期工作,除了 x 轴中的轴标签与线点或条不同步。
正如this issue 中建议的解决方案所说,这是由于日期格式问题,我尝试在new example 中设置日期/时间格式。 但问题依旧。
chart.xAxis
.showMaxMin(true)
.tickFormat(function(d) { return d3.time.format('%b %d %Y')(new Date(d)) })
对我来说,它最初看起来是 NVD3 库的问题,因为相同的格式对于我检查的其他图表类型非常有效。因此我提出了一个问题here。
【问题讨论】:
标签: d3.js charts nvd3.js linechart