Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Data Visualization with D3 and AngularJS

You're reading from  Data Visualization with D3 and AngularJS

Product type Book
Published in Apr 2015
Publisher
ISBN-13 9781784398484
Pages 278 pages
Edition 1st Edition
Languages
Authors (2):
Erik Hanchett Erik Hanchett
Profile icon Erik Hanchett
Christoph Körner Christoph Körner
Profile icon Christoph Körner
View More author details

Table of Contents (16) Chapters

Data Visualization with D3 and AngularJS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The Magic of SVG, D3.js, and AngularJS Getting Started with D3.js Manipulating Data Building a Chart Directive Loading and Parsing Data Drawing Curves and Shapes Controlling Transitions and Animations Bringing the Chart to Life with Interactions Building a Real-time Visualization to Monitor Server Logs Index

Summary


In this chapter, you learned about two different XHR techniques to load external data for the visualization: d3.xhr with D3.js and $http with AngularJS. If we include an already existing chart application in the AngularJS application, we can wrap the D3.js loading component into a service. In order to test this component, we need to write asynchronous unit tests.

If we write the visualization from scratch, we'd better implement the data loading technique with the $http module of Angular JS. This allows you to mock the behavior of $httpBackend and automatically serve data for specified routes. With this method, we can continue to write synchronous tests, which are more readable and expressive.

In the second part of this chapter, we parsed a string of log entries into an array of JavaScript objects. In addition to the parser service, we implemented a grouping service based on the d3.nest() function. In the end, we brought all the parts together and plotted an aggregated view of the log...

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 $15.99/month. Cancel anytime}