在dygraphs中隐藏Y2轴标签不会回收画布右侧的空间

时间:2013-04-29 23:09:43

标签: dygraphs

如果全局设置drawYAxis:false,如何在画布上隐藏Y2轴并回收空间。左侧和右侧隐藏了标签,但在图表的右侧仍然无法填充~50px的填充。左侧(Y1)按预期完全回收。

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.
            }
        },

1 个答案:

答案 0 :(得分:1)

听起来像个臭虫。我在这里修好了: https://github.com/danvk/dygraphs/commit/9f890c23ad80924d0a30f3a14f8680b7c2d6318e

如果您从github或dygraphs.com获取一份新的dygraph副本,您将获得修复。