vutuong / Draw-Chart-API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In this demo, I tried to practise Python-Flask framework, I also learned to use Chart.js to draw the rate of each IP pool.

This demo is deployed in a VM with Centos 7 OS.

Step 1: Install Flask framewwork (https://cloudwafer.com/blog/installing-flask-on-centos-7/)

$ pip install Flask

Step2: Create a demo directory called ChartPool. In ChartPool directory, create app.py file, which include code to render home.html

Step3: In ChartPool directory, create templates directory, which includes home.html

Step4: In home.html, import Chart.js and boottrap,... :), load data from API and display them by using Chart.js

git add .
git commit -a
git push origin

About


Languages

Language:HTML 89.3%Language:Python 8.0%Language:CSS 2.7%