Skip to content

Instantly share code, notes, and snippets.

@kattak
Last active January 10, 2017 06:18
Show Gist options
  • Save kattak/dbb5ebfccb4cafff06d370c08ad5166a to your computer and use it in GitHub Desktop.
Save kattak/dbb5ebfccb4cafff06d370c08ad5166a to your computer and use it in GitHub Desktop.

#About d3.js

#First Step ✮ Either use a gem - this one is most popular iblue/d3-rails

-You might get a json v1.8.1 error

-Delete the Gemfile.lock

✮ Or include it in your application.js

  1. In app/assets/javascripts/application.js
//This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require d3.v4
  1. Or include it in your app/views/layouts/application.html.erb
<script src="https://d3js.org/d3.v3.min.js"></script>

#Links

  1. Visualization of CDC data | [Heroku] (http://floating-ocean-1736.herokuapp.com/)
  2. Official d3.js Github repo
  3. Tutorial - d3 in rails
  4. iblue/d3-rails
  5. Notester
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment