Highcharts Higcharts-marginBottom不允许渲染xAxis系列省略号

Highcharts Higcharts-marginBottom不允许渲染xAxis系列省略号,highcharts,Highcharts,xAxis的空间通常由Highcharts库动态渲染,并在正确的位置添加省略号,使其从一开始就显示,当它停止在带有一些省略号的图形上显示时,将其剪切 当我尝试将该空间更改为不动态渲染时,属性marginBottom会执行此操作,但当文本开始显示时,它会停止拾取,并且文本的开头会从图形的下方剪切。是否有一种方法可以正确呈现highcharts底部的文本?我需要它旋转270度,不让自动旋转工作,不想折叠图形的更多部分只是为了显示文本 以下是发生这种情况时的示例: Highcharts.chart('

xAxis的空间通常由Highcharts库动态渲染,并在正确的位置添加省略号,使其从一开始就显示,当它停止在带有一些省略号的图形上显示时,将其剪切

当我尝试将该空间更改为不动态渲染时,属性
marginBottom
会执行此操作,但当文本开始显示时,它会停止拾取,并且文本的开头会从图形的下方剪切。是否有一种方法可以正确呈现highcharts底部的文本?我需要它旋转270度,不让自动旋转工作,不想折叠图形的更多部分只是为了显示文本

以下是发生这种情况时的示例:

Highcharts.chart('container', {
    chart: {
    height: 350,
    spacingBottom: 0,
    marginBottom: 50,
        type: "column"
   },

  series: [{
      name: 'Total', 
      data: [1,2,3,4,5]
    }],

  xAxis: {
    categories: ["very long name to test if the characters are rigth and cropped", 
                            "Not so long but long enough", "I still am long and out of the screen", 
                "lets see how is cropped", "cropped", "crop"],
    labels: {
        rotation: 270
    }
    }
});
用边沿底部拨弄样品

如果删除
marginBottom
,即使图例也会向下移动一点

有可能这样做吗?甚至包括一些css


提前感谢

要使其按您想要的方式工作,您必须在Highcharts core中进行一些修改。例如,您可以不使用
marginBottom
选项,而是在
renderUnsquish
方法中将固定值设置为
commonWidth
变量:

if (attr.rotation) {
  commonWidth = (
    maxLabelLength > chart.chartHeight * 0.5 ?
    40 :  // changed from 'chart.chartHeight * 0.33'
    maxLabelLength
  );
  if (!textOverflowOption) {
    commonTextOverflow = 'ellipsis';
  }
}
现场演示: