question about ruby graphics

Z

zedenator

Hello Rubyists,

some background:
I am looking into using Ruby for my university project, the outcome of
which is an application capable of displaying tree-like structures
given a specific set of data and populated by an arbitrary number of
nodes at any level (something like http://tkhtml.tcl.tk/tree.gif). The
application needs to be interactive in a sense that clicking with a
mouse on any of the nodes would result in some action taken.

I experimented a little WxRuby and its my prefered toolkit for coding
the entire application in (cross-platform is a requirement), but its
drawing methods arent the most suitable for my case. Idealy I'd want
to describe the tree using something that looks and feels like Dot
language format used by Graphviz and feed that into some external
module to actually generate the graphics.

The question I have is is there anything that has such/similar
functionality in Ruby? All I seemed to find are various static
graphing tools, neither do I want to spend time writing code to
manually arrange a set of rectangles on the screen.

Any ideas are welcome. Thanks!


/zedenator
 
B

Brian Candler

I am looking into using Ruby for my university project, the outcome of
which is an application capable of displaying tree-like structures
given a specific set of data and populated by an arbitrary number of
nodes at any level (something like http://tkhtml.tcl.tk/tree.gif). The
application needs to be interactive in a sense that clicking with a
mouse on any of the nodes would result in some action taken.

Have a look at graphviz (www.graphviz.org). It can generate such trees and
make them clickable as client-side imagemaps. I believe there is a Ruby
binding (google for it), but at worst you create a temporary file and then
run the graphviz utility using system() or IO.popen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top