Book Image

Data Visualization with D3 and AngularJS

By : Erik Hanchett, Christoph Körner
Book Image

Data Visualization with D3 and AngularJS

By: Erik Hanchett, Christoph Körner

Overview of this book

Table of Contents (16 chapters)
Data Visualization with D3 and AngularJS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 2. Getting Started with D3.js

In this chapter, we will build our first simple scatter plot application using D3.js. Don't worry if you have no experience with D3.js, we will cover all the necessary topics from setting up a simple HTML template, selecting DOM elements, and binding data to DOM elements.

First, you will learn how to draw vector graphics with the use of D3.js. To get started, we will set up a simple D3.js application template that serves for all examples in this chapter.

In the second section, you will learn how to select and modify elements from the DOM and change their attributes and their appearance. Starting with modifying HTML elements, I will answer some common questions to understand the similarities and differences between D3.js and other JavaScript libraries. We will then apply these transformations to SVG elements.

Then, we will take a closer look at D3 Selections and CSS Selectors in D3.js. This will help us to understand how to find and select specific elements...