Highcharts separate categories

2019-07-24 23:40发布

Check this fiddle to get an idea of what I am talking about

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"
            }
        }
 },

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

1条回答
你好瞎i
2楼-- · 2019-07-25 00:13

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

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

And see it live: http://jsfiddle.net/JEGGf/42/

查看更多
登录 后发表回答