在极坐标图上的每个x位置重复标记

时间:2014-04-26 05:48:37

标签: highcharts polar-coordinates

我需要在极坐标图上重复显示每个x轴的标签(通过highcharts)。目前我有(通过JSFiddle):

jQuery("#container").highcharts({

    "chart": {
        "polar": true,
        "type": "line"
    },

    "title": {
        "text": "VIDA PESSOAL"          },

    "legend": {
        "enabled": false
    },

    "pane": {
        "size": "80%"
    },

    "xAxis": {
        "categories": ["fam\u00edlia\/amigos","moradia","sa\u00fade","dinheiro",
                       "crescimento pessoal","crescimento profissional","lazer"],
        "tickmarkPlacement": "on",
        "lineWidth": 0
    },

    "yAxis": {
        "tickInterval": 1,
        "min": 0,
        "max": 6
    },

    "plotOptions": {
        "line": {
            "lineWidth": 0
        },
        "series": {
            "animation": false,
            "color": "red"
        }
    },

    "series": [{
        "name": "Pontuação",
        "data": [2,1,5,3,1,3,3],
        "pointPlacement": 'on'
    }]

});

所以我期待其中一个结果(参见示例图片):

  1. 标签“0,1,2,3,4,5”保留所有x行 - image
  2. 在每个地块的顶部显示标签 - image;
  3. 在每个地块内显示标签 - image;
  4. 最好的解决方案是第一个,但我可以考虑其他人。

1 个答案:

答案 0 :(得分:1)

您可以启用数据标签,设置颜色和调整y参数。

                marker:{
                    radius:10
                },
                dataLabels:{
                    enabled:true,
                    color: 'white',
                    y:7
                },

http://jsfiddle.net/6upMk/3/