在两列highcharts中显示图例项目 [英] Display legend items in two columns highcharts

查看:299
本文介绍了在两列highcharts中显示图例项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在highcharts中,是否可以将图例显示为两列,垂直堆叠?

In highcharts is it possible to display the legend in two columns, stacked vertically?

我试图找出显示图例项目的最佳方式,

I'm trying to work out the best way of displaying the legend items, at the moment we have the legend items all stacked on top of each other.

图表上最多有4个系列。

There will be a maximum of 4 series on the chart.

我真的不知道如何处理这个,我看到useHTML的选项,但是我似乎找不到任何关于如何处理HTML的例子。

I'm not really sure how to approach this, I see the option of useHTML but then I can't seem to find any examples of what to do with the HTML.

http://jsbin.com/oyicuc/9/edit

任何建议都会非常有帮助,谢谢。

Any advice would be very helpful, thanks.

推荐答案

itemWidth参数?

Have you tried to use itemWidth parameter?

请参阅

http://jsfiddle.net/B9L2b/1266/

 legend: {
    width: 200,
    itemWidth: 100
},

http://api.highcharts.com/highcharts#legend.itemWidth

EDIT:

http://jsbin.com/oyicuc/31/

width:600,
        itemWidth:300,
        itemStyle: {
          width:280
        }

http://api.highcharts.com/highstock#legend.itemStyle

这篇关于在两列highcharts中显示图例项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆