Modified chart controller to dynamically set the height depending on the number of filtered rows