Skip to Main Content
Mastering Angular Components - Second Edition
book

Mastering Angular Components - Second Edition

by Gion Kunz
July 2018
Intermediate to advanced content levelIntermediate to advanced
402 pages
9h 35m
English
Packt Publishing
Content preview from Mastering Angular Components - Second Edition

Creating an activity chart

It's time to create our first chart component using Chartist! However, before we get into our component, we need to make sure that Chartist is installed within our project. Let's use npm to install Chartist as a dependency:

npm install chartist@0.11.0 @types/chartist@0.9.40 --save

Chartist is currently written in pure JavaScript. Luckily, the community created a very sophisticated type definition for Chartist, so you can benefit from typed interfaces when using Chartist with TypeScript.

Okay; that's all it takes to get us going with Chartist. Now, let's create our activity chart using the Angular CLI:

ng generate component --spec false -ve none -cd onpush projects-dashboard/activity-chart

Let's open the generated ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Angular, 2nd Edition

Learning Angular, 2nd Edition

Brad Dayley, Brendan Dayley, Caleb Dayley
Essential Angular

Essential Angular

Victor Savkin, Jeff Cross
Pro Angular 6

Pro Angular 6

Adam Freeman

Publisher Resources

ISBN: 9781788293532Supplemental Content