Code Monkey home page Code Monkey logo

open_flash_chart_2_plugin's Introduction

About
=====================================
open flash chart 2 plugin for rails applications

This library was ported from the open flash chart project's php code to be used with Ruby on Rails.
Visit the open flash chart project here - http://teethgrinder.co.uk/open-flash-chart-2/

NOTE:
sample application is using haml
  gem install haml
plugin is using json
  gem install json

Details
=====================================
Go to http://openflashchart2.sentor.pl for details

Install plugin
=====================================
get only plugin to existing application:
go to plugins directory
    cd vendor/plugins
clone git repo to open_flash_chart_2 directory
    git clone git://github.com/korin/open_flash_chart_2_plugin.git open_flash_chart_2
go to main rails directory
    cd ../..
install it using rake command
    rake open_flash_chart_2:install

Example of usage
=====================================
include js file in loyout or anything else where you need that:
  = javascript_include_tag 'swfobject.js'

in some conroller:
  class SomeController < ApplicationController
    def funny_action
                   #width, height, link to data
      @graph = ofc2(650,300, "charts_ofc2/line") 
    end
  end

in charts_ofc2 conroller:
  class ChartsOfc2Controller < ApplicationController
    def line
      title = OFC2::Title.new( DateTime.now.strftime('%Y-%m-%d %H:%M'), "{font-size: 14px; color: #b50F0F; text-align: center;}")
      line_dot = OFC2::Line.new
      line_dot.values= [9,8,7,6,5,4,3,2,1]
      chart = OFC2::Graph.new
      chart.title= title
      chart << line_dot
      render :text => chart.render
    end
  end

in views/some/funny_action.haml view
  = @graph

That's it, try it.
If You have trouble try sample application (info below), or ask me va e-mail ([email protected]).


Get sample application
=====================================
Grab whole sample application:
go to directory where you want create sample application
    git clone git://github.com/korin/open_flash_chart_2.git
install plugin (instruction is above)
customize database.yml
customize what you want ;)

Help
=====================================
Looking for help?
try:
home page: http://openflashchart2.sentor.pl/infos
or email to me: [email protected],
  don't forget write 'open flash chart' in subject or my mail client will treat your message as spam.

open_flash_chart_2_plugin's People

Contributors

rlisowski avatar

Stargazers

Angus H. avatar Dharmdip Rathod avatar

Watchers

Dharmdip Rathod avatar James Cloos 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.