Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
D3.js 4.x Data Visualization

You're reading from   D3.js 4.x Data Visualization Learn to visualize your data with JavaScript

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher Packt
ISBN-13 9781787120358
Length 308 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Aendrew Rininsland Aendrew Rininsland
Author Profile Icon Aendrew Rininsland
Aendrew Rininsland
Swizec Teller Swizec Teller
Author Profile Icon Swizec Teller
Swizec Teller
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Getting Started with D3, ES2017, and Node.js FREE CHAPTER 2. A Primer on DOM, SVG, and CSS 3. Shape Primitives of D3 4. Making Data Useful 5. Defining the User Experience - Animation and Interaction 6. Hierarchical Layouts of D3 7. The Other Layouts 8. D3 on the Server with Canvas, Koa 2, and Node.js 9. Having Confidence in Your Visualizations 10. Designing Good Data Visualizations

Summary


In this chapter, first we set up Webpack to produce a separate bundle for the server, then we wrote a simple webapp using Koa 2 that used D3's Voronoi geom to find the nearest airport to a particular latitude/longitude pair. We then upgraded our server app to draw a map using D3 and Canvas, which we then outputted to the user as a PNG via a base64-encoded string.

Wasn't that all really pretty weird, but also kind of fun? Writing server-side code is like that. However, it can also be really rather cathartic after spending a bunch of time doing frontend development, which tends to be really finicky due to having to support so many devices. Furthermore, although purely client-side single-page applications were popular for a while, webapps are increasingly pre-rendered via a server, then rehydrated once they arrive for the user. It's never been more important for frontend developers to have at least a passable understanding of what's going on behind the scenes.

There's clearly quite a...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime