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:
- Start the server with ng serve
- Generate random data with npm run generate
- Start mock json server with npm run 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.
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.