HighCharts : Adding Hyperlinks to the X-Axis of the chart

后端 未结 2 940
野趣味
野趣味 2021-02-20 17:24

I have been using HighCharts in my PHP website by migrating it from older charts and I am very impressed by the number of graph options and functions with this library.

2条回答
  •  隐瞒了意图╮
    2021-02-20 18:19

    var categoryLinks = {
            'Foo': 'http://www.google.com',
            'Bar': 'http://www.facebook.com',
            'Foobar': 'http://www.stackoverflow.com'
        };
        $('#container').highcharts({
            xAxis: {
                categories: ['Foo', 'Bar', 'Foobar'],
    
                labels: {
                    formatter: function () {
                        return '' +
                            this.value + '';
                    }
                }
            },
            series: [{
                data: [300, 200, 600]
            }]
        });
    

提交回复
热议问题