Highcharts -图例重叠图表区域

noj0wjuj  于 9个月前  发布在  Highcharts
关注(0)|答案(1)|浏览(97)

我的图例与图表区域重叠,我试图绘制图表左侧的图例。左边缘、左间隔不起作用。
Legends overlapping issue in highcharts
JSFiddle:https://jsfiddle.net/tLomq3sa/

"legend": {
        "enabled": true,
        "maxHeight": 350,
        "floating": false,
        "width": 400,
        "symbolWidth": 11,
        "symbolHeight": 11,
        "align": "left",
        "verticalAlign": "middle",
        "padding": 30,
        "itemStyle": {
            "width": 110,
            "fontSize": "16",
            "margin-right": 200
        }
    },
 "chart": {
        "marginRight": 0,
        "marginLeft": 50,
        "spacingBottom": 0,
        "type": "column",
        "height": null,
        "width": null,
        "options3d": {
            "enabled": true,
            "alpha": 8,
            "beta": 20,
            "viewDistance": 30
        },
        "events": {},
        "spacingLeft": 100
    },

请帮帮我

t1qtbnec

t1qtbnec1#

如果您将verticalAlign: 'middle'align: 'left'结合使用,则chart.marginLeft不应设置为静态值,因为图表不会自动计算图例的宽度。

...
chart: {
  marginRight: 0,
  //marginLeft: 50,
  ...
},
...

Demohttps://jsfiddle.net/BlackLabel/89t5bu0m/

相关问题