Highcharts 海图:可以有多个图例吗?

Highcharts 海图:可以有多个图例吗?,highcharts,legend,Highcharts,Legend,我是海图新手,到目前为止,它看起来非常棒。但是,我需要在图例中将我的六个系列分为三列。这可以通过限制图例宽度和使用legendIndex来实现。Coffeescript中的配置代码段: legend: # 3 items side-by-side with some margins itemWidth: Math.floor(config.width / 3.8) series: [ # top left legendIndex: 1

我是海图新手,到目前为止,它看起来非常棒。但是,我需要在图例中将我的六个系列分为三列。这可以通过限制图例宽度和使用
legendIndex
来实现。Coffeescript中的配置代码段:

  legend:
    # 3 items side-by-side with some margins
    itemWidth: Math.floor(config.width / 3.8)
  series: [
      # top left
      legendIndex: 1
      ...
    ,
      # bottom left
      legendIndex: 4
      ...
    ...  # 4 more series; other columns in indices 2,5 and 3,6
    ]
问题是,我还需要为每个小组分别指定一个标题。类似这样的东西(ascii艺术):


请注意,我还需要导出功能,因此据我所知,HTML定位是不可能的。如何使图例看起来像这样?

您可以使用Highcharts渲染器将自定义文本放置到图表上


你不能制作多个图例,但你可以用一个图例做很多事情,使其看起来像多个图例。

结果表明,我绝对需要多个图例——有标题的组是不够的。你是否尝试过使用labelFormatter和Inside Function计算何时应该添加“标题”@SebastianBochan感谢您的投入!我想到了这一点,但是如果我用
useHTML
定位标题,导出会变得混乱。非即时导出的图表不使用html/css样式。这个问题与类似,但答案也是“不可能”
Title A               Title B                 Title C
[ ] Item A1           [ ] Item B1             [ ] Item C1
[ ] Item A2           [ ] Item B2             [ ] Item C2