我有这张图表:https://playground.anychart.com/D7okDBpO/2
我希望绘图和x轴标签在左右边缘都有一些填充(原因之一是最后一个x标签现在甚至还不完全可见),类似于图表顺序比例尺被渲染。对于剧情,我设法做到了:
series.left(30);
series.right(30);
但是我找不到x标签的解决方案。我尝试过的:
// This doesn't work because it moves both first and last label
chart.xAxis().labels().offsetX(-30);
// This doesn't work because it moves all the labels, even the ones in the middle
chart.xAxis().labels().padding().left(50);
答案 0 :(得分:1)