Book Image

Data Visualization with D3 4.x Cookbook - Second Edition

By : Nick Zhu
Book Image

Data Visualization with D3 4.x Cookbook - Second Edition

By: Nick Zhu

Overview of this book

Master D3.js and create amazing visualizations with the Data Visualization with D3 4.x Cookbook. Written by professional data engineer Nick Zhu, this D3.js cookbook features over 65 recipes. ? Solve real-world visualization problems using D3.js practical recipes ? Understand D3 fundamentals ? Includes illustrations, ready-to-go code samples and pre-built chart recipes
Table of Contents (21 chapters)
Data Visualization with D3 4.x Cookbook - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Dimensional charting - dc.js


Visualizing Crossfilter dimensions and groups is precisely the reason why dc.js was created. This handy JavaScript library was created by your humble author and is designed to allow you to visualize Crossfilter dimensional dataset easily and quickly. This library was originally created by your humble author now maintained by a group of community contributor led by Gordon Woodhull.

Note

dc.js version 2.0 beta that we used in this chapter has not yet been upgrade to D3 v4.x therefore you will notice usage and references to old D3 v3 API which is somewhat different from what we have witnessed so far in this book.

Getting ready

Open your local copy of the following file as reference:

https://github.com/NickQiZhu/d3-cookbook-v2/blob/master/src/appendix-a/dc.html

How to do it...

In this example we will create three charts:

  • A line chart for visualizing total amount of transaction on time series
  • A pie chart to visualize number of transactions by payment type
  • A bar chart showing...