About a lens in "Recent United States Senate Bills" example

49 views
Skip to first unread message

Andrea Borruso

unread,
Aug 26, 2011, 10:49:31 AM8/26/11
to simile-...@googlegroups.com
Hi all,
I'm studying exhibit and I would like to obtain something similar to "Recent United States Senate Bills":
- http://www.simile-widgets.org/exhibit/examples/senate/senate.html

I have obtained something similar, but I'm not able to run the lens of the tabular view. In the tabular view of this exhibit, if you click one of the values of "sponsored" column you have a bubble with the rendering of the lens.

I have built a tabular view with my data, I have built a lens, but I do not know how to activate the view of a lens on click at the values of a particular column. I have a table with flat values without any hyperlink.

I'm using exhibit 2.2.0.

Thank you very much,

Andrea

Ryan Lee

unread,
Aug 26, 2011, 4:04:02 PM8/26/11
to simile-...@googlegroups.com
Hi Andrea,

That's actually something Exhibit does on its own based on your data.
The data loaded is represented as

Bill --[sponsor]--> Senator

but this collection is actually Senator-oriented (see the
ex:role="exhibit-collection" HTML snippet). So Exhibit already knows
the object of the reverse relation would be an item in the database

Senator --[sponsors]--> Bill

It will render database items as the popup producing-link.

You will need to add a schema to your data set if you haven't already to
inform the database the relationship is to an item. See

http://simile.mit.edu/wiki/Exhibit/Getting_Started_Tutorial#Schema

particularly valueType: "item". Please provide a link to your page if
you need further assistance.

Andrea Borruso

unread,
Aug 27, 2011, 4:00:15 AM8/27/11
to simile-...@googlegroups.com
Hi Ryan,
thank you.

My app is simpler than "Recent United States Senate Bills": I have no collection and only one kind of item.

I have a tabular view, and I would like to have bubbles for the values of my columns, and in every bubble some values from the fields of the record I have selected. Is there a native way  to do that in exhibit for the tabular view?
I'm able to obtain this using row templates and some tooltip javascript library.

An offtopic note: I'm testing using twitter bootstrap to style exhibit, and it seems to me cool.

Best regards,

Andrea


Ryan Lee

unread,
Aug 31, 2011, 7:48:32 PM8/31/11
to simile-...@googlegroups.com
Hi Andrea,

There isn't a simple, template-based way to do that, no. You'll have to
look at the SimileAjax Javascript.

http://api.simile-widgets.org/ajax/2.2.1/scripts/graphics.js

Specifically SimileAjax.createBubbleForContentAndPoint. Generally, I
guess you'd have to template the content you want in a div and hide that
div from display, only showing it when the bubble is created.

I'd be curious to see what you're doing with Bootstrap if you don't mind
sharing.

On 8/27/11 1:00 AM, Andrea Borruso wrote:
> Hi Ryan,
> thank you.
>
> My app is simpler than "Recent United States Senate Bills": I have no
> collection and only one kind of item.
>
> I have a tabular view, and I would like to have bubbles for the values of my
> columns, and in every bubble some values from the fields of the record I
> have selected. Is there a native way to do that in exhibit for the tabular
> view?
> I'm able to obtain this using row templates and some tooltip javascript
> library.
>

> An offtopic note: I'm testing using twitter bootstrap<http://twitter.github.com/bootstrap/>to style exhibit, and it seems to me cool.
>
> Best regards,
>
> Andrea
>
>

Reply all
Reply to author
Forward
0 new messages