Display Percentage Values on (highcharts) bubble chart

荒凉一梦 提交于 2019-12-06 22:13:31

you just need to add the format option

 bubble: {
            dataLabels: {
                enabled: true,
                x:30,
                format: "{y}%"
            },
        }

see fiddle here https://jsfiddle.net/ewng3aqa/1/

See other answers for simpler solution. For the more complex solution using jquery:

The setTimeout is used to wait for the Chart to be loaded.

setTimeout(function(){
    var objects = $('.highcharts-data-label text tspan');
    var text = "";
    objects.each(function(){
        text = $(this).text();
        $(this).text(text + ' %');
    });
},500);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!