here we are setting minHeight: 600 or any number but it would not be generic one. As i am getting data from API i cannot be sure how many data items are there in series.data so i give say minHeight: 1000 and there are 10 records then its fine but if more or less than 10 like 5 then there will be huge gap.
I am trying minHeight: 120 * x but again it not meeting exact requirements
Yes, you are right - this setting gives you a fixed minHeight. Just like a CSS property with the same name.
I would suggest updating the scrollablePlotArea.minWidth with your custom logic (which is completely fine!) in chart.events.render. Just figure out the value that you want to achieve, grab the necessary data i.e amount of data points, and you are good to go!