在 nvd3 箱线图上禁用 y 轴最大值和最小值

disable y-axis max and min values on nvd3 boxplot

我正在使用 nvd3 箱线图并想删除图中显示的最大值和最小值。例如,我想要值768 显示在下表的 y 轴上。

关于我如何做的任何建议。 谢谢

渲染图表后执行:

d3.selectAll(".nv-axisMaxMin-y").remove(); //it will remove the max min

工作代码here

希望对您有所帮助!

设置图表:{ y轴:{ 显示最大最小值:假 } }

对象 属性 和删除方法的替代方法是调用图表对象本身的 showMaxMin 方法:

chart.yAxis.showMaxMin(false);