2013-04-29 42 views
0

如何在画布上隐藏Y2轴并在全局设置drawYAxis:false时回收空间。左侧和右侧隐藏了标签,但在图的右侧仍然未填充〜50px的填充。如预期的那样,左侧(Y1)完全回收。在dygraph中隐藏Y2轴标签不会回收画布右侧的空间

drawYAxis: false, 
series: { 
       'Altitude': { 
        axis: 'Y2', 
        drawYAxis: false <-- this doesn't work. 
       } 
     }, 
     axes: { 
      x: { 
       axisLabelFormatter: xAxisLabelFormatter, 
       axisLabelFontSize: 12, 
       axisLabelColor: "#FFF" 
      }, 
      y2: { 
       drawYAxis: false <-- neither does this. 
      } 
     }, 

回答