admin管理员组文章数量:1327661
I would like to make a line chart with nvd3(which is a collection of re-usable charts made with d3.js), which has y and x axis represented by a line.
Here is the line chart example from the official nvd3 site:
.html
I would like something like this, where the X axis line displayed:
.png
Has nvd3 any options for that? Is it even possible? Thanks.
I would like to make a line chart with nvd3(which is a collection of re-usable charts made with d3.js), which has y and x axis represented by a line.
Here is the line chart example from the official nvd3 site:
http://nvd3/examples/line.html
I would like something like this, where the X axis line displayed:
https://i.sstatic/RmzLA.png
Has nvd3 any options for that? Is it even possible? Thanks.
Share Improve this question edited Apr 14, 2015 at 8:50 Sebastian Bochan 37.6k3 gold badges51 silver badges75 bronze badges asked Apr 13, 2015 at 15:30 Márk FarkasMárk Farkas 1,5461 gold badge14 silver badges28 bronze badges2 Answers
Reset to default 6It looks like it's controlled by this CSS rule (nv.d3.css line 225):
.nvd3 .nv-axis.nv-x path.domain {
stroke-opacity: 0;
}
Overriding that with your own CSS should show the line (at least, changing the value to 1 in the developer tools worked for me).
.nvd3 .nv-axis.nv-x path.domain, .nvd3 .nv-axis.nv-y path.domain {
stroke: black;
shape-rendering: crispEdges;
}
本文标签: javascriptNVD3 line chart display X axisStack Overflow
版权声明:本文标题:javascript - NVD3 line chart display X axis - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742231223a2437250.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论