1 - First Look at Template
The dashboard template provides the HTML/CSS/JS needed to get started with web-based data visualization. The template uses the following tools to make things easier for us.
Google Sheets - This will function as our "database" of tables.
Structured Query Language (SQL) - SQL will be used to pull the right data from the database for visualizing.
Google Charts API - This library will allow us to create charts in our web app.
Instructions
1 - Create files in a new Repl.it or other code environment.
Use the code from Getting Started to create your HTML, Javascript, and CSS files. Verify that the dashboard displays an example bar chart and table.
2 - Review the HTML
Notice the basic page structure for the "cards" that contain elements for the charts. See below for reference.
3 - Review the CSS
Notice the "card" class that creates the shadow effect you see with the charts.
4 - Review the Javascript
Notice that we load an example table from the "Degrees" tab in a Google sheet that you can see here.
The function
composeDegreeCharts()
runs automatically once the data is loaded.In
composeDegreeCharts()
we create our charts by specifying SQL (more on this later), the chart type, and the HTML element it should be placed.
That's the quick overview of the template. We will dig into the details and how to customize things next.
Last updated