How do I use D3js in Wordpress?

Viewed 5189

I have installed wordpress as well as the plugin for d3js. Now, what is the best way to upload the data so that I can make and serve graphs on the fly?

  • If I upload the csv files directly, where do I store it? Does it matter?
  • If I want to store the data in a third party site, what can I use? Preferably free service.

I have made graphs in my localmachine and I want to publish those graphs now.

5 Answers

After going through lot of websites, youtube videos, here's my solution:

  1. Install File Manager plugin
  2. Add a folder for your d3 projects (ex: d3-projects/project_1), this should be inside public_html folder along with wp-admin, wp-content
  3. Ensure that javascript code is embedded in your index.html page
  4. Add index.html & css file to the project_1 folder
  5. Preview your D3js chart at your_site_url/project_1
Related