我正在使用以下内容将图例成功放置在JQPlot折线图之外:
legend:{show:true,location:'sw',placement:'outside'},
但是,这使得图例太靠近图表,与我的yaxis标签一致 . 我需要将它进一步向左移动 . 有没有办法做到这一点?
谢谢 .
有点晚了,当然,但我知道了!您应该使用 placement: 'outsideGrid' 而不是 placement: 'outside' ,因为'outsideGrid'将缩小图例的图形区域,使其不与其混合 .
placement: 'outsideGrid'
placement: 'outside'
希望这有帮助!
尼科
检查Legend的marginTop,marginRight,marginBottom,marginLeft属性 .
你应该能够做到:
legend: { show: true, location: 'sw', placement: 'outside', marginLeft: 300 }
你必须像这样使用它 . marginLeft : "300px"
marginLeft : "300px"
legend: { show: true, location: 'sw', placement: 'outside', marginLeft: "300px"
}
3 回答
有点晚了,当然,但我知道了!您应该使用
placement: 'outsideGrid'
而不是placement: 'outside'
,因为'outsideGrid'将缩小图例的图形区域,使其不与其混合 .希望这有帮助!
尼科
检查Legend的marginTop,marginRight,marginBottom,marginLeft属性 .
你应该能够做到:
你必须像这样使用它 .
marginLeft : "300px"
}