javascripthighchartshighcharts-gantt

Hide datalabels highchart gantt js


I need to hide the labels that are displayed outside the range of the navigator

When going left or right with the scroll, the labels of the data that are not yet seen are shown. How can I hide them when I leave their respective range?

I leave an image of what is happening to me

This also happens to me, I don't know if I should ask this question separately but I'll leave it in case you can help me

https://jsfiddle.net/carmaro/Lpmc63us/11/ my code


Solution

  • If I understand correctly, you employ dataSorting to hide series in the navigator. However, it's important to note that this option is not applicable to Gantt charts, as you can check in the API documentation: https://api.highcharts.com/gantt/. This disparity may potentially lead to issues when utilized.

    To not display the series in the navigator, an alternative approach is to utilize an empty data array in navigator.series. For instance:

      series: [{
        data
      }],
    
      navigator: {
        enabled: true,
        series: {
          data: []
        }
      },
    

    Demo: https://jsfiddle.net/BlackLabel/3v1rew24/