ionic3: วาดกราฟด้วย Chart.js

  1. สร้างโปรเจ็กส์
  2. Install Angular 2 Charts and Charts.js
  3. Show Line Charts
  4. Create Bar Charts
  5. Create Doughnut Chart

1. สร้างโปรเจ็กส์

ionic start ionic-charts blank

รันโปรเจ็กส์

cd ionic-charts
ionic serve

2. Install Angular 2 Charts and Charts.js

npm install ng2-charts --save
npm install chart.js --save

src/app/app.module.ts

3. Show Line Charts

src/pages/home/home.html

src/pages/home/home.ts

4. Create Bar Charts

src/pages/about/about.html

src/pages/about/about.ts

5. Create Doughnut Chart
src/pages/contact/contact.html

src/pages/contact/contact.ts

Link

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.