Get Json data by sending HTTP post request, and convert data to line chart with Chart.js.
練習傳送Http Post請求,從網站上取得資料,並將資料用Chart.js畫成line chart.
Create a currency exchange rate graph.
- Get exchange rate from a bank website by sending POST request
- Convert data to the format that Chart.js required.
- Create a line chart with Chart.js.
- Update line chart when users change the parameters.
web site: https://www.esunbank.com.tw/bank/personal/deposit/rate/forex/exchange-rate-chart?Currency=USD/TWD
This demo is build with with Maven 3.5.3 and Java 1.8.
- Import as a maven project.
- Run as Spring Boot App.
- Open http://localhost:8080/ in the browser.