Expanding table rows revisited

28 views
Skip to first unread message

NA

unread,
Aug 19, 2011, 1:16:01 PM8/19/11
to Google Visualization API
Does anyone have ideas on how to expand a Table row to show more rows
when it's clicked? There are a couple of earlier threads asking about
this - one doesn't get answered, the other suggests tooltips, which
doesn't seem particularly useful.

Are there better ideas?

Perhaps something like using the jQuery expand plugin with the Table
visualization? Or is that going to have problems (say, when
sorting)?

Thoughts/ideas?

asgallant

unread,
Aug 19, 2011, 2:57:59 PM8/19/11
to google-visua...@googlegroups.com
Hmmm...maybe you could assign special classes to your collapsed rows (by using the setPropery methods to set the cell classes), draw the chart, use jQuery to hide the rows, and set up a selection event handler that uses jQuery to unhide/rehide the specific rows associated with the selected row?

NA

unread,
Aug 19, 2011, 5:15:12 PM8/19/11
to Google Visualization API
That's sort of what I was thinking.

I'm worried, though, that this code will "collide" with the GVIZ
Table's sort capability. I think I'd have to make sure my detail rows
stayed below their parent rows; but not sure as I still haven't yet
clearly planned it out.

At present, I just display details in a separate area of the screen
when a row is clicked. That works and is robust, but it's not as
visually efficient as having the details appear right where you click.

I might just do this in a normal html table instead, and then work
with styles to make all the tables look similar. It'd be really nice
to have this in the Google Tables, though.

thanks for your thoughts!

Reply all
Reply to author
Forward
0 new messages