nvd3 line chart, how to remove gridlines and yaxis

爷,独闯天下 提交于 2019-11-30 13:39:49

To remove tick on y-axis

.nv-axis.nv-y .tick line {
        display:none;
    }

To remove tick on x axis

.nv-axis.nv-x .tick line {
        display:none;
    }

To remove label on x axis

.showXAxis(false)

To remove label on y axis

.showYAxis(false)

To remove all the grid lines

.nv-axis .tick line {
        display:none;
    }

.showYAxis(false) should remove the y axis.

If that doesn't work, you can apply .nv-y text{display: none;} as a style.

Use the style .tick line {display: none;} to get rid of grid lines, and keep x axis.

Get rid of all axis and lines with .tick{display: none;}

:)

To remove the gridlines:

    .nv-axis .tick line {
        display:none;
    }

And axes can be done more straightforwardly:

.showYAxis(false)
.showXAxis(false)

To hide grid line, just add this to your css

.tick line {
display: none;
}

and for the X Axis just add .showYAxis(false)

if you want to delete only the yAxis line and keep the ticks you can do it with the CSS:

.nvd3 .nv-axis.nv-y path.domain{
 stroke-opacity: 0;
}

see this plunker for example.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!