D3.js - Extensible visualizations in Drupal

Speakers: 

We’ve reached a point in Drupal visualizations where if you’d like to make a simple bar chart, you have a number of tools available. If you’d like to make a chord, bubble, or force directed chart though, you have to be a developer.

The most common implementation of chart APIs in Drupal is to have the PHP code write your actual Javascript code. The benefit of this is as a Drupal developer, you know PHP already, you can create a new chart without writing any Javascript. The developer creates one array, the module handles the rest.

The downside is that since the Javascript API is embedded inside PHP wrappers, updates to the API will either make module updates difficult, or impossible. Much like HTML is left to the theme layer, Javascript is best left to a separate layer.

This session will discuss why since libraries are a great way to already handle things like jQuery plugins, they are also a great way of handling D3 visualizations. Libraries act as that separate layer for all of your custom D3 Javascript code.

We’ll explore how to use the d3 project to create a custom d3.js library, how to call an API wrapper that can be as simple or as complicated as you make it, and how to integrate your visualization with Drupal views and/or services.

Schedule info
Track: 
Experience level: 
Advanced
Drupal Version: 
Drupal 7.x