Giter Site home page Giter Site logo

c3-rails's Introduction

c3-rails

c3 is a D3-based reusable chart library that enables deeper integration of charts into web applications.

c3-rails provides c3 for Rails 4 (it might work with Rails 3)

Installation

To install, add the following line to your Gemfile:

gem 'c3-rails'

Then add these to their respective file:

app/assets/javascripts/applications.js:

//= require c3

app/assets/stylesheets/applications.css:

*= require c3

Now you've included c3 into your rails project.

But wait, there's more!

Dependency: D3

c3 requires D3 which c3-rails does not include, to get D3 installed try one of the following gems:

or you could copy d3.js to your assets/javascripts manually which would defeat the purpose of having these gems in the first place...

Now you're ready to use c3 in any page that load assets handled by the asset pipeline.

Alternative install

If you want to have access to all of c3's source files you should add this line instead:

gem 'c3-rails', :git => 'https://github.com/SunnyLi/c3-rails', :submodules => true

Then you'll be able to include files like

    //= require c3/c3
    //= require c3/extensions/js/c3ext
    
    *= require c3/c3
    *= require c3/htdocs/css/bootstrap.min.css

License

Both c3 and c3-rails are licensed under the MIT license

c3-rails's People

Contributors

sunnyli avatar

Watchers

James Cloos avatar Patrick Carolan 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.