Book Image

Mastering D3.js 5 [Video]

By : James Cross
Book Image

Mastering D3.js 5 [Video]

By: James Cross

Overview of this book

<p>Curious about creating advanced visual representations of your data? Do you want to go beyond adding stunning interactive charts to your web project? Are you looking to build a reusable library of charts for your work? Then, this course is for you! </p><p> </p><p>This course focuses on the features in the latest version of D3. D3’s comprehensive JavaScript library for interacting with the dom, connecting data to elements in the dom, animating elements, and working with data are supremely helpful for crafting unique, styled, and reusable visualizations for the browser. </p><p> </p><p>Take this course and you’ll learn to make powerful visual representations of data using D3. Become a master at topics like making visualizations responsive, integrating 3rd party API data into visualizations, interactive and color-coded mapping, linking charts together for updates across visualizations, and more. </p><p> </p><p>Please note that Knowledge of JavaScript is assumed, together with some prior familiarity with D3.js </p><p> </p><p>All the code files for this course are available on Github at -https://github.com/PacktPublishing/Mastering-D3.js-5-</p>
Table of Contents (8 chapters)
Chapter 1
Making Reusable Chart Functions
Content Locked
Section 4
Create a BuildChart Function
There are plenty of examples of D3 visualizations on the web, but sometimes the code seems too specific for the example. Here, we use a bar chart from the community as a starting point, and put the chart-building logic into a function, that can be re-used. - Prepare a function that takes two parameters, data and id - Put all of the chart-element logic into the function - Use the data & id that were passed for chart rendering