Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Data Visualization with D3 and AngularJS

You're reading from   Data Visualization with D3 and AngularJS Build dynamic and interactive visualizations from real-world data with D3 on AngularJS

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781784398484
Length 278 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Erik Hanchett Erik Hanchett
Author Profile Icon Erik Hanchett
Erik Hanchett
Christoph Körner Christoph Körner
Author Profile Icon Christoph Körner
Christoph Körner
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. The Magic of SVG, D3.js, and AngularJS FREE CHAPTER 2. Getting Started with D3.js 3. Manipulating Data 4. Building a Chart Directive 5. Loading and Parsing Data 6. Drawing Curves and Shapes 7. Controlling Transitions and Animations 8. Bringing the Chart to Life with Interactions 9. Building a Real-time Visualization to Monitor Server Logs Index

Creating an HTML template for D3.js

To set up a template page for all visualization examples, we first need to download D3.js and include it to the application. In this book, we will use version 3.5.5, but all of the examples should also work with slightly different versions (~3.4.12 and ~3.5.0). There are multiple ways to add D3.js to an application:

  • Installing it with the package manager bower (recommended):
    bower install d3#3.5.5
    
  • Loading it from a Content Delivery Network (CDN) (//cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.js).
  • Downloading it and storing it to a libs directory (https://github.com/mbostock/d3/releases/tag/v3.5.5).

The easiest way to use D3.js in our application is to simply download D3.js directly from GitHub and extract it into the libs directory. In contrast to the CDN method, this does not require an active Internet connection while developing. However, the recommended way is to use a package manager such as bower to manage and configure all third-party dependencies.

So...

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 $19.99/month. Cancel anytime
Banner background image