如何在 Highcharts 中向 x 和 y 轴添加注释文本?

问题描述

我有一个气泡图,需要在 x 轴和 y 轴上显示注释文本。我已经整理了一张图片来展示我希望通过使用注释实现的目标:

Bubble Chart

我对此很陌生,如果有人可以提供帮助,我将不胜感激。

https://jsfiddle.net/Sam786/qwormkt2/1/

let chart = Highcharts.chart('bubble_chart',{
            chart: {
                type: 'bubble',zoomType: 'xy'
            },title: { text: "" },xAxis: {
                title: {
                    text: "106. How disruptive has the COVID-19 pandemic been to your ability to do your work?"
                },plotLines: [{
                    value: 4,color: 'darkgray',dashStyle: 'shortdash',width: 2,valueDecimals: 2,// label: {
                    //     text: 'SEC Avg',// }
                    zIndex: -1
                }],},yAxis: {
                title: {
                    text: "107. How has your work demands changed because of the COVID-19 pandemic?"
                },plotLines: [{
                    value: 2.5,label: {
                        text: 'SEC Average',verticalAlign: 'bottom'
                    }
                }]
            },credits: {enabled: false},tooltip: {
                useHTML: true,headerFormat: '',pointFormat:  '<strong>{point.org}</strong><br/>'+
                              'Respondents: <b>{point.z}</b><br/>'+
                              'X-Question Avg: <b>{point.x}</b><br/>'+
                              'Y-Question Avg: <b>{point.y}</b>',footerFormat: '',valueDecimals: 1
            },series: [{
                name: groups[0],color: Highcharts.getOptions().colors[0],data: []
            },{
                name: groups[1],color: Highcharts.getOptions().colors[1],{
                name: groups[2],color: Highcharts.getOptions().colors[2],data: []
            }]
        });

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)