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
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));