Created
August 6, 2017 20:26
-
-
Save ojanvafai/56fe3c710c5909aac9604630957bfcd9 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/jegumacemi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://www.gstatic.com/charts/loader.js"></script> | |
<script> | |
var URL = "https://docs.google.com/spreadsheets/d/1CyTpbs6OQorCEBR8ZI-hwP_pj_YF8XJz8a0qa3fugh0/edit"; | |
google.charts.load('current', {'packages':['gantt']}); | |
// Set a callback to run when the Google Visualization API is loaded. | |
google.charts.setOnLoadCallback(() => { | |
var query = new google.visualization.Query(URL); | |
query.send((response) => { | |
var data = response.getDataTable(); | |
data.ng[2].type = data.ng[3].type = "date"; | |
var chart = new google.visualization.Gantt(document.getElementById('chart_div')); | |
var options = { | |
// height: 275, | |
gantt: { | |
defaultStartDateMillis: Date.now() | |
} | |
}; | |
chart.draw(data, options); | |
}); | |
}); | |
</script> | |
<div id="chart_div"></div> | |
<script id="jsbin-source-html" type="text/html"><script src="https://www.gstatic.com/charts/loader.js"><\/script> | |
<script> | |
var URL = "https://docs.google.com/spreadsheets/d/1CyTpbs6OQorCEBR8ZI-hwP_pj_YF8XJz8a0qa3fugh0/edit"; | |
google.charts.load('current', {'packages':['gantt']}); | |
// Set a callback to run when the Google Visualization API is loaded. | |
google.charts.setOnLoadCallback(() => { | |
var query = new google.visualization.Query(URL); | |
query.send((response) => { | |
var data = response.getDataTable(); | |
data.ng[2].type = data.ng[3].type = "date"; | |
var chart = new google.visualization.Gantt(document.getElementById('chart_div')); | |
var options = { | |
// height: 275, | |
gantt: { | |
defaultStartDateMillis: Date.now() | |
} | |
}; | |
chart.draw(data, options); | |
}); | |
}); | |
<\/script> | |
<div id="chart_div"></div> | |
</script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment