请参阅下面的例子,来自高图表的官方文件。在图例和图表之间还有一些空白。我想使图表尽可能大,但不重叠的传奇。
我的图表数据是动态的。图例项的数量是可变的。因此,我不能使用固定的边缘底/ marginTop。
chart: {
marginBottom: 50, // does not work for me, as the number of legend items is varied.
marginTop: -10
}
发布于 2016-12-07 14:20:19
您可以移除图例上的空白和边距,以获得一些空间。
legend : {
margin: 0,
padding: 0
},
根据你想要的距离,如果你需要的话,你可以把保证金变成负数。
https://stackoverflow.com/questions/41028175
复制