Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Highcharts dataLabel border

I have some problems with Highcharts Maps library. How can I remove the black dataLabels border?

Here are my settings:

var Map = $('#container').highcharts('Map', {
    mapNavigation: {
        enabled: true,
        buttonOptions: {
            verticalAlign: 'bottom'
        }
    },

    colorAxis: {
        min: 0
    },

    series : [{

        mapData: Highcharts.maps['gbpostcodes'],

            dataLabels: {
                enabled: true,
                fontSize:'20px',
                color:'yellow',
                borderWidth: 0,
                format: '{point.properties.Name}'
            }

    }]
});

(see attached screenshot) enter image description here

like image 450
romvlads Avatar asked Aug 31 '15 12:08

romvlads


3 Answers

Highcharts V5 code for fixing this is

dataLabels: {
  style: {
    textOutline: 0
  },
}
like image 181
dukarc Avatar answered Nov 18 '22 19:11

dukarc


You sure can. See the API docs here regarding dataLabels. To remove the border set:

    dataLabels: {
    ...
    borderWidth: 0,
    ...
    },

If you are talking about the text shadows you can do this in your dataLabel as well:

            dataLabels: {
                enabled: true,
                fontSize: '20px',
                color: 'yellow',
                borderWidth: 0,
                format: '{point.properties.Name}',
                style: {
                    textShadow: false
                }
            },
like image 20
wergeld Avatar answered Nov 18 '22 21:11

wergeld


This did the job for me:

plotOptions: {
        series: {
          dataLabels: {
            style: {
              textOutline: 0,
            }
        }
    }
}
like image 6
cuddlemeister Avatar answered Nov 18 '22 19:11

cuddlemeister