ale4ko69
Posts: 15
Joined: Thu Jan 23, 2020 4:25 pm

A problem with showing the amount of points in the cluster

Hi all.
Another problem arose out of nowhere. The number of points in each cluster has also ceased to be displayed.
When checking, it is clear that the data exists. And the SVG model has an element to display this number, but there is no number itself. 3 days already I can not figure it out. Can anyone suggest where to look for the problem?

Image
Image
jakub.s
Posts: 1075
Joined: Fri Dec 16, 2022 11:45 am

Re: A problem with showing the amount of points in the cluster

Hi,

Thanks for the question!

Could you please reproduce this issue in an online code editor like JSFiddle so I can take a look?

It's probably related to some additional logic you're adding as everything seems to work fine here: https://jsfiddle.net/gh/get/library/pur ... r-clusters

I'll be waiting for your response.

Kind regards!
Jakub
Highcharts Developer
ale4ko69
Posts: 15
Joined: Thu Jan 23, 2020 4:25 pm

Re: A problem with showing the amount of points in the cluster

Hi jakub.s,
I have prepared a code example http://jsfiddle.net/ale4ko69/2ynkmd8c/181/, where you can see:
  • that in some clusters the number is not displayed, moreover, if I zoom in a little then the numbers appear and when zooming out, the started state of the clusters returns.
  • Here you can also see that the country labels are superimposed on the clusters and interfere with clicking on them or swiping with the mouse.
  • Also pay attention if you slowly zoom with the mouse wheel, then the clusters that were in Europe jump to North America (to the left of the chart)
ale4ko69
Posts: 15
Joined: Thu Jan 23, 2020 4:25 pm

Re: A problem with showing the amount of points in the cluster

Hi jakub.s,
I have prepared a code example http://jsfiddle.net/ale4ko69/2ynkmd8c/181/, where you can see:
  • that in some clusters the number is not displayed, moreover, if I zoom in a little then the numbers appear and when zooming out, the started state of the clusters returns.
  • Here you can also see that the country labels are superimposed on the clusters and interfere with clicking on them or swiping with the mouse.
  • Also pay attention if you slowly zoom with the mouse wheel, then the clusters that were in Europe jump to North America (to the left of the chart)
  • If in the code set useHTML to true - cluster amounts not visible at all

    Code: Select all

    plotOptions:{
    	mappoint: {
      		cluster: {
    			dataLabels: {
    				useHTML: true,
    			}
      		}
    	}	
    }
    
jakub.s
Posts: 1075
Joined: Fri Dec 16, 2022 11:45 am

Re: A problem with showing the amount of points in the cluster

Hi,

You're right, this clearly is a problem.

I believe that it stems from the overlapping of many dataLabels from different series.

Take a look at these examples:
1. if we disable the dataLabels on the first series then the clusters appear correctly as no dataLabels from other series overlap the clusters: https://jsfiddle.net/BlackLabel/otbrewcj/
2. if we set allowOverlap: true on the first series the clusters labels also show up: https://jsfiddle.net/BlackLabel/nfo86705/

These demos may point you to some kind of custom solution that fits your needs while the bug persists.

Please report this as a bug on our GitHub repository: https://github.com/highcharts/highchart ... .md&title= so our Map Developers can take a look and start working on it.

Best regards!
Jakub
Highcharts Developer

Return to “Highcharts Maps”