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

Processing and visualizing logs on the client


In the previous section, you learned how to push the server logs from the server to the client; now, we need to organize these logs on the client, and then process and display them.

Bootstrapping a template with AngularJS and Socket.IO

Let's create a HTML page for our client application; we need to load the JavaScript libraries (D3.js, AngularJS, Socket.IO, the CSS layout Bootstrap, and all application files). Due to the usage of Socket.IO on the server side, it can be referenced on the client side with the /socket.io/socket.io.js pseudo location; all other third-party libraries are loaded from the bower_components directory.

We create the index.html page in the root directory of the project, add all libraries, and set up a very simple Bootstrap layout:

<!-- index.html -->
<html ng-app="myApp">
  <head>
    <!-- Include 3rd party libraries -->
    <script src="bower_components/d3/d3.js" charset="UTF-8"></script&gt...