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

172
Visualizações
Counting empty periods in DateAxis amchart

How can I count empty periods in DateAxis in amchart? I need to change height of conteiner based on that value and data.lenght. Or how can I set min thickness of date column? And I hope that whole height will stretch out to be more visible. Amchart 4

So I want this

To look like this

This is the part of code where I need that count of empty periods in order to calculate height of parent element.

var cellSize = 50;
this.chart.events.on("datavalidated", function(ev) {
    var chart = ev.target;
    var dateAxis = chart.yAxes.getIndex(0);
    var adjustHeight = chart.data.length * cellSize - dateAxis.pixelHeight;
    var targetHeight = chart.pixelHeight + adjustHeight;
    if(targetHeight < 600) targetHeight = 600;
    this.$refs.chartdiv.parentElement.style.height = targetHeight + "px";
}.bind(this));
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