github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jpemberthy / ezgraphix

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 21
    • 5
  • Source
  • Commits
  • Network (5)
  • Issues (0)
  • Downloads (0)
  • Wiki (2)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • master ✓
    • release_test
  • Tags (0)
Sending Request…
Click here to lend your support to: ezgraphix and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A rails plugin to generate flash based graphics for rails applications using a free and customizable chart's set. — Read more

  cancel

http://ezgraphixdemo.heroku.com/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Merge branch 'master' of git://github.com/jpemberthy/ezgraphix 
Diego Caliri (author)
Wed Jan 27 11:55:43 -0800 2010
commit  50a2d523748f7368cacc5d8241c5a5e1aa9ab4a5
tree    1b3b4ee331e31c2e93c4ae1565c602c161dc8c1b
parent  a30238049de06f88d2f327be8574eff45d111ab3 parent  8fa4d917489135f15e2a196a23ef1dcccd3f5aa7
ezgraphix /
name age
history
message
file .gitignore Fri Jan 09 11:08:34 -0800 2009 Updating .gitignore [jpemberthy]
file FusionChartsFreeLICENSE.textile Wed Dec 10 14:20:52 -0800 2008 Adding FreeFusionCharts and it's License. [jpemberthy]
file README.textile Wed Jan 27 11:55:43 -0800 2010 Merge branch 'master' of git://github.com/jpemb... [dcaliri]
file init.rb Wed Jan 07 08:34:21 -0800 2009 Extending ActionView. [jpemberthy]
directory lib/ Wed Jan 27 11:34:09 -0800 2010 Added multiseries charts support [dcaliri]
directory public/ Tue Dec 30 11:42:47 -0800 2008 moving charts to public folder, also adding Fus... [jpemberthy]
directory spec/ Thu Feb 26 11:03:34 -0800 2009 removing bad spec. [jpemberthy]
directory tasks/ Thu Jan 08 09:40:11 -0800 2009 back to javascript name [jpemberthy]
README.textile

EZGraphix

Documentation

API Documentation

Demo

Online Demo

Installation Notes

Install the plugin:

script/plugin install git://github.com/jpemberthy/ezgraphix.git

Run the tasks: (it will move the necessary files to use the plugin)

rake ezgraphix:setup    # run from your project's root 

After the installation include the FusionCharts.js in each layout that will render ezgraphix:

<%= javascript_include_tag "FusionCharts" %>

and that’s it!.

Usage

In your Controller:

For single series charts:

def index
  @g = Ezgraphix::Graphic.new
  @g.data = {:ruby => 1, :perl => 2, :smalltalk => 3}
end

For multiseries charts:

In this case you have multiple values for each serie. Also you need to specify categories (labels). In the example below there are 2 series “Registrations” and “Payments” and values are divided into 7 months (labels) with a value for each serie/month.

def index
  @g = Ezgraphix::Graphic.new
  @g.data = { "Registrations" => [4,2,12,7,0,3,6], "Payments" => [7,3,5,2,1,0,9] }
  @g.labels = ["March", "April", "May", "June", "July", "August", "September"]
end

There are 2 ways to pass render options:

1. When the Graphic object is created, you can define it also as:

@g = Ezgraphix::Graphic.new(:w => 200, :h => 300, :c_type => 'bar3d', :div_name => 'my_chart_tag_name')

The defaults are:

{:c_type => ‘col3d’, :w => 300, :h => 300, :div_name => ’ez_graphic’}

At the moment, you can render the following graphics:

Column 2D => :c_type => 'col2d'
Column 3D => :c_type => 'col3d'
Bar 2D    => :c_type => 'bar2d'
Pie 2D	  => :c_type => 'pie2d'
Pie 3D	  => :c_type => 'pie3d'
Line	  => :c_type => 'line'
Doughnut 2D  => :c_type => 'doug2d'
MultiSeriesLine => :ctype => 'msline'
MultiSeriesColumn3D => :ctype => 'mscol3d'
MultiSeriesColumn2D => :ctype => 'mscol2d'
MultiSeriesArea2D => :ctype => 'msarea2d'
MultiSeriesBar2D => :ctype => 'msbar2d'

2. Anytime you want, by accessing the render_options attribute.

@g.render_options(:caption => 'cool languages', :w => 400)  #Merges new options with the last configuration.

In your view.

Add the following line wherever you want to render the graphic.

<%= render_ezgraphix @g %>

Tests

 rake spec		#run from the plugin's root 

Note.

Full set of render_options are specified in the rdoc, and more chart’s support will be included soon!.

EZGraphix

A Ruby gem to generate flash based graphics for rails applications using a free and customizable chart’s set.

Copyright © 2008 Juan Esteban Pemberthy, released under the MIT License.

EzGraphix uses FusionCharts Free, It’s license is specified in the FusionChartsFreeLICENSE file.

Fork and feel free to contribute!

LICENSE:

(The MIT License)

Copyright © 2008 Juan Esteban Pemberthy

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
‘Software’), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server