Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!