现在我有这样的额外目的。
有没有办法摆脱这些目的?目前我正在使用此设置:
nv.addGraph ->
chart = nv.models.lineChart()
.showLegend(false)
.width(elem.width())
.margin(top: 10, left: 50, bottom: 20, right: 50)
chart.xAxis
.tickValues(_.map(data[0].values, (d) -> d.x))
.tickFormat((d) -> d3.time.format('%d/%m')(new Date(d)))
.tickPadding(10)
chart.yAxis
.tickFormat(d3.format('+.2f'))
.tickPadding(10)
.showMaxMin(false)
d3.select(elem[0])
.datum(data)
.transition().duration(0)
.call(chart)
谢谢!
答案 0 :(得分:1)
尝试使用yDomain
图表选项扩展y轴的域名:
chart.yDomain([-0.70, 0.50]);