Giter Site home page Giter Site logo

3months / open_flash_chart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pullmonkey/open_flash_chart

1.0 28.0 1.0 1.95 MB

The ruby on rails plugin for teethgrinder's Open Flash Chart (version 2)

Home Page: http://pullmonkey.com/projects/open_flash_chart2/

License: MIT License

Ruby 100.00%

open_flash_chart's Introduction

OpenFlashChart  Version 2.0.0  11/14/2008 
==============

1) rails ofc2_test_app
2) cd ofc2_test_app
3) script/plugin install git://github.com/pullmonkey/open_flash_chart.git
4) script/generate controller test_it

5) Add the following to the test_it_controller.rb in RAILS_ROOT/app/controllers:
class TestItController < ApplicationController
  
  def index
    respond_to do |wants|
      wants.html {
        @graph = open_flash_chart_object( 600, 300, url_for( :action => 'index', :format => :json ) )
      }
      wants.json { 
        chart = OpenFlashChart.new( "MY TITLE" ) do |c|
          c << BarGlass.new( :values => (1..10).sort_by{rand} )
        end
        render :text => chart, :layout => false
      }
    end
  end

end

6) Add the following to index.html.erb in RAILS_ROOT/app/views/test_it/:
<html>
<head>
  <script type="text/javascript" src="/javascripts/swfobject.js"></script>
</head>
<body>
<%= @graph %>
</body>
</html>

7) script/server
8) Let me know how it goes, thanks.


Example
=======

Example above and more to follow here - http://www.pullmonkey.com/projects/open_flash_chart


Copyright (c) 2008 PullMonkey, released under the MIT license

open_flash_chart's People

Contributors

harryseldon avatar dfl avatar johnf avatar otavio avatar

Watchers

Paul Salisbury avatar Daniel Zollinger avatar Jon Waghorn avatar Josh McArthur avatar Jack Callister avatar James Cloos avatar James McCann avatar Klaus Hott Vidal avatar Bret Richdale avatar Matt avatar Charles Peach avatar Ben Greville avatar Lukas Nguyen avatar  avatar Chris Noldus avatar Charlie Gavey avatar  avatar  avatar tdawg avatar Jess avatar Jack Ewing avatar Marian Clements avatar Raquel Moss avatar  avatar  avatar  avatar Isaac avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.