smarter handling of chart height