我如何使用Highcharts在水平条形图数据点中放置文本,以及如何在每个数据点下方添加文本?下面的示例:

问题描述 投票:0回答:1

Here is what I am going for, disregard the pointer on top.

highcharts
1个回答
0
投票

您可以使用annotations模块:

annotations: [{
    labels: [{
        borderRadius: 0,
        padding: 20,
        backgroundColor: '#fff',
        style: {
            color: '#000'
        },
        point: {
            xAxis: 0,
            yAxis: 0,
            x: 0,
            y: 15
        },
        y: -130,
        text: 'Col de la Joux'
    }]
}]

实时演示: http://jsfiddle.net/BlackLabel/eb9k5o7m/

API参考: https://api.highcharts.com/highcharts/annotations

文档: https://www.highcharts.com/docs/advanced-chart-features/annotations-module

© www.soinside.com 2019 - 2024. All rights reserved.