Highcharts分开类别 [英] Highcharts separate categories

查看:96
本文介绍了Highcharts分开类别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看这个小提琴,了解我在说什么

这是我的xAxis配置:

This is my xAxis configuration:

 "xAxis": {
        "categories": ["Category ONE", "Category TWO"],
           "allowDecimals": false,
        "title": {
            "text": " ",
            "align": "middle",
            "style": {
                "color": "steelblue"
            }
        },
        "labels": {
            "y": 12,
            "style": {
                "color": "steelblue"
            }
        }
 },

我需要类别1和类别2以几个像素(50,100,无论我想要的数量)分隔,但无法找到此解决方案问题。我知道有一种方法可以为系列做到这一点,但是当您只想分开类别时,没有相应的方法。

I need category one and category two to be separated by a few pixels (50,100, whatever amount I want) but cannot find the solution for this issue. I know there is a way to do it for series but there is no equivalent for when you only want to separate the categories.

提前致谢

Thanks in advance

推荐答案

plotOptions有一些选项可以控制系列。填充可以通过更改groupPadding的值来获得:

plotOptions have some options which can control series. Padding is possible to get by changing value of groupPadding:

"plotOptions": {
   "column": {
      "groupPadding": 0.1
   }
}

看到它直播: http://jsfiddle.net/JEGGf/42/

这篇关于Highcharts分开类别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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