Hi,
Quite late answer, but I found it when googling around.
A solution I found to this problem was the following:
1) Count rows in the table
2) Defin a variable that is equal to the amount of rows multiplied with the
height of one row (and add 1 extra pixel, to avoid the scroll bar)
3) Added an "if" total height > YOUR MAX HEIGHT then the height changes to
your set max height.
var HeightOfTable = (data.getNumberOfRows()+1.5) * 20 + 1
if (HeightOfTable > 601) {
HeightOfTable = 601
}
I added 1.5 to my rows to compensate for the header row.
Yay, first post :)
Den onsdag 11 april 2012 kl. 14:41:21 UTC+2 skrev Tjeerd Kramer:
>
> I know I can set the height of a table visualisation in the options field,
> however, this seems limited to a fixed height. Is it possible to somehow
> set a maxheight instead, so that if the table is less then the defined
> number of pixels in height, it's size automatically shrinks?
>
--
You received this message because you are subscribed to the Google Groups
"Google Chart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-chart-api.
For more options, visit https://groups.google.com/d/optout.