/angular-chartjs-example

Plotting API data with chart.js in Angular

Primary LanguageTypeScriptThe UnlicenseUnlicense

Angular + Chart.js example

Plotting API data with chart.js in Angular

Some of the topics covered in this example include: ng-bootstrap for styling, ng2-charts/chart.js for data representation, HttpClient service for queries, interfaces, mock json-server for data consuming, generator for random data generation, and others.

Usage:

  1. Start the server with ng serve
  2. Generate random data with npm run generate
  3. Start mock json server with npm run server

alt text

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.