Highcharts separate categories

会有一股神秘感。 提交于 2019-12-24 11:53:46

问题


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:


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/



来源:https://stackoverflow.com/questions/13808135/highcharts-separate-categories

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!