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 4
Building Responsive Utilities and Charts
Content Locked
Section 2
Using a Resize Function for Chart Updating
When a user resizes the window of their browser, visualizations can get out of hand if not cared for. Here, we use D3 to incorporate an event listener on the windows resize event. The visualization will update when the window resizes. - Use D3 to build a resize event listener - Gather an updated height & width in the resize event - Pass the updated dimensions to a visualization element