Highcharts Legend与X轴重叠

Ell*_*esa 4 javascript highcharts

我正在设置一个图表,其中图例位于折线图下方.出于某种原因,图例似乎与其上方的x轴重叠.我对图例的设置如下:

 legend: {
            layout: 'horizontal',
            align: 'center',
            itemWidth: LegendWidth,
            verticalAlign: 'bottom',
            floating: true,
            margin: 25,
            borderWidth: 3,
            useHTML:true,
       }
Run Code Online (Sandbox Code Playgroud)

LegendWidth动态设置在哪里.我已经为保证金添加了一个值,但它仍然重叠.

在此输入图像描述

qtg*_*gye 7

您应该将legend.y设置为某个正数以将其向下移动.

legend: {
            layout: 'horizontal',
            align: 'center',
            itemWidth: LegendWidth,
            verticalAlign: 'bottom',
            floating: true,
            margin: 25,
            borderWidth: 3,
            useHTML:true,
            y : 25 /* pushes the legend 25 points down */
       }
Run Code Online (Sandbox Code Playgroud)

这是doc,这是一个示例