Review of "Data Visualization with D3.js Cookbook" by Nick Qi Zhu

Great book, solid advice, focused on D3-specifics.

"Data Visualization with D3.js Cookbook" by Nick Qi Zhu, ISBN 978-1-78216-216-2

The book starts with a very helpful intro to the functional-style JavaScript programming practiced by D3. Everything is a function that usually returns an instance, allowing to chain method calls

function Something() {
var instance = {}; = function (n) { = n; return instance; };
instance.color = function (c) { instance.color = c; return instance; };
return instance;
var s = Something()

This is neither classical object oriented, nor prototypical JavaScript programming. Most books and tutorials on D3 skip this explanation. In this case, the author makes the right call and shows that he understands what will puzzle the majority of people using D3 library.

The book moves on to cover major D3 topics: selections, data binding, element attributes, axes, etc. Each chapter provides plenty of source code listings, with lines relevant to the topic at hand highlighted. The book strikes perfect balance between explaining each concept clearly, but without boring the reader with needless repetition.

I wish the author provided examples as jsFiddle snippets in addition to github pages to make executing them faster. I do appreciate that every example (that does not load any data) loads as a static page, if you grab the entire book example repo from github.