Create a Chart
Terms defined: Scalable Vector Graphics (SVG)
- Use Chart.xkcd to display chart
- Create a button and an empty SVG
- Fetch data and pass to
display(…)
instatic/dashboard.js
when button clicked
- Modify the
/data
route inserver.py
to return JSON data- Format it in the server rather than sending columns and reorganizing in the browser
- Note: chart is in a
div
whose maximum width is set in CSS because that's easier than sizing SVG
Run
python server.py --seed 12345
- Go to http://127.0.0.1/5000
- Click the button to fetch data and display chart