I had a question about my assignment. The main this is for this assignment we ha
ID: 3848058 • Letter: I
Question
I had a question about my assignment. The main this is for this assignment we have been given links to Google Spreadsheets with data in them and I am trying to link that data into 3 different charts and 1 control. My problem is that my code is not correct when i try to do a query function that will allow for the charts to show so please help if possible here is some of the requirements.
Use Google Chart Tools (JavaScript API) to visualize a data set of your choice. A few examples are listed below. Create a dashboard with at least three (3) charts and at least one (1) control.
You don’t have to visualize all the data in the spreadsheet. Select the columns that you find useful or interesting.
Read the data directly from a Google Spreadsheet. Don’t manually enter the data in the code. Don’t load data from a local file.
I just want to get some general understanding of the code I already have my own but for some reason my three charts are not showing at this time.
Explanation / Answer
The data visualization from the google spread sheet can be provided with the below mentioned chart.js -(java script). This is a JavaScript library with fewer chart types .
The library can be loaded on the page HTML in two ways:
<script src="Chart.js"></script>
<script>
var myChart = new Chart({...})
</script>
Or else as follows:
// Using CommonJS
var Chart = require('src/chart.js')
var myChart = new Chart({...})
// ES6
import Chart from 'src/chart.js'
let myChart = new Chart({...})
// Using requirejs
require(['path/to/Chartjs'], function(Chart){
var myChart = new Chart({...})
})
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.