Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Acts As Treemap

Acts As Treemap

= ActsAsTreemap

This plugin depends on the RubyTreemap library which can be found here: http://rubytreemap.rubyforge.org

Install: script/plugin install http://code.qnot.org/svn/projects/acts_as_treemap

== Usage

class MyDataNode < ActiveRecord::Base acts_as_tree :order => “units” acts_as_treemap :label => “title”, :size => “units”, :color => “roc” end

class TreemapController < ApplicationController def index id_of_root_node = 1 @root = DataNode.find(id_of_root_node) end end

In the view

<%= html_treemap(@root) %>

Author

Andrew Bruno &lt;aeb>

Copyright

Copyright© 2006 by Andrew Bruno <aeb>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly

Users


See all 2 member details


Membership

+ Join this railsplugin

Record Maintainer

'None'