Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • AngularJS Web Application Development Blueprints
  • Toc
  • feedback
AngularJS Web Application Development Blueprints

AngularJS Web Application Development Blueprints

By : Vinci J Rufus
4.3 (7)
close
AngularJS Web Application Development Blueprints

AngularJS Web Application Development Blueprints

4.3 (7)
By: Vinci J Rufus

Overview of this book

If you are a web application developer interested in using AngularJS for a real-life project, then this book is for you. As a prerequisite, knowledge of JavaScript and HTML is expected, and a working knowledge of AngularJS is preferred.
Table of Contents (12 chapters)
close
11
Index

Building a bar chart directive based on D3


Besides simply showing a list of all the expenses entered, it would be a lot meaningful if we can also display a summary of the total expenses across the categories as a bar chart.

We will build our own custom bar chart directive that will generate graphs based on the inputs provided.

For this, we will use the D3 JavaScript library to create a SVG-based bar graph.

Note

Complete details on D3 and various examples of how to use it are available at http://d3js.org/.

An important thing to remember about the D3 library is that D3 is not a ready-to-use graphing library, where you pass the data values and define what type of graph you want.

D3 could be thought of as jQuery, but for data visualization. D3 simply provides a set of APIs to easily update and manage the DOM.

So, while bar graphs are amongst the most basic type of graphs, D3 can be used to build fairly complex and highly interactive data visualizations.

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete