[英]NVD3 How to remove Y-axis in Line chart and also utilize the space of Y-axis after it is removed
我正在使用NVD3顯示折線圖。 我有此折線圖,如下所示:
chart: {
type: 'lineChart',
height: 150,
margin : {
top: 20,
right: 20,
bottom: 40,
left: 55
},
x: function(d){ return d.x; },
useInteractiveGuideline: true,
"xAxis": {
ticks:7,
showMaxMin : false,
tickFormat:
function (d) {
var x = globalFactory.getCalendarConstants().dateMap.weekDayShortLabels
return x[d] },
},
showYAxis:false,
showLegend : false,
}
它消除了Y-Axis
而的空間Y-axis
,不使用。 我想用完那個空間。
他們有什么解決辦法嗎?
您可以嘗試調整邊距(請參閱下文),盡管您可能需要稍微調整一下邊距才能以所需的方式將其隔開。
margin : {
top: 20,
right: 20,
bottom: 40,
left: 0
},
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.