Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

165
Visualizações
Highcharts get if data is currently beeing grouped with multiple series

I want to determine wether data grouping is currently beeing applied to a series or not after the user zooms in into the graph.
When there is only one series inside the graph it works just fine with the approach i found by using the hasGroupedData, which returns true if data is grouped and undefined if it's not.

chart.series[0].hasGroupedData

However, if there are more than one series inside the graph this always returns true once the data grouping has been applied once on the series so there is no way for me to know anymore if the data is beeing grouped or not.

Data Grouping

The same behaviour is with the normal Highcharts chart as well as the Highstock stockchart, which I want to use.
I am out of ideas how else i could determine if the series is beeing grouped or not so any help would be appreciated.

Example code: https://jsfiddle.net/Itsearnest/ho0a4zw9/

var chart = Highcharts.stockChart('container', {
    chart: {
        zoomType: "x"
    },
  navigator:{
    enabled:false
  },
  yAxis:[{},{}],
  xAxis:{
    events:{
        afterSetExtremes: (event) => {
        var info = document.getElementById("info");
        info.innerHTML = "";
        chart.series.forEach((elem) =>{
            info.innerHTML += ("Data grouped for " + elem.name +": " + elem.hasGroupedData) + "<br>";
        });
      }
    }
  },
  series: [{
    data: Array.from({length: 50000}, () => Math.floor(Math.random() * 500))
  }]
});

document.getElementById("add").onclick  = (event) => {
    var base = Math.floor(Math.random()*1000);
    chart.addSeries({
        data: Array.from({length: 50000}, () => base + Math.floor(Math.random() * 500))
    });
};

Edit. It turns out it is a bug in Version 10.0.0. After downgrading to 9.1.2 it works as intended (https://github.com/highcharts/highcharts/issues/17141)

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda