2

I am using a custom map in highmaps. My map is rendering well and when I try to bind the points to data it works. My problem is I cannot read the point properties or attach events to any point. The error on the console is that this.point.properties is undefined. https://jsfiddle.net/mwendakith/0tyfph44/

plotOptions: {
            map: {
            allAreas: false,
            dataLabels: {
                enabled : true,
              formatter: function(){
                if(this.point.properties){
                    return this.point.properties['name'];
                }
              }
            },
          },
      },
joel
  • 161
  • 1
  • 6

1 Answers1

2

I have found that the point properties are accessible within the series definition. https://jsfiddle.net/mwendakith/0tyfph44/3/

series: [
    {
        "type": "map",
        "data": data,
        dataLabels: {
                enabled: true,
                color: '#FFFFFF',
                format: '{point.name}'
            },
    }
],
joel
  • 161
  • 1
  • 6