score:2

Accepted answer

there is not a built in method to dynamically increase the chart size based on the number of elements.

i handle this server side in most cases. i establish a 'base height' to account for top and bottom margins. then i define a multiplier, set to the height needed for each element.

then i count my data array, multiply by the multiplier, and add the base, and echo it as the height of the chart's containing div.

you could certainly handle this in javascript as easily by modifying the containing element's height after establishing the data, and before calling the chart.

working example:


Related Query