Forum Discussion
Hi Elenora,
I haven't used the specific chart you're trying to use, but I have used Google charts in Quickbase code pages for org charts.
I noticed 2 differences in your code from what I've used.
1. The use of data.addColumn to define the data used in the chart.
2. The quickbase URL starts with www.quickbase.com vs the usual company.quickbase.com.
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
google.load('visualization', 'current', {packages:['orgchart']});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Child');
data.addColumn('string', 'Parent');
date.addColumn('string', 'Tool Tip');
var url = "https://www.quickbase.com/db/mytableid?a=API_GenResultsTable&jsa=1";
$.getScript(url,function(){
data.addRows(qdb_data);
var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));
chart.draw(data, {allowHtml:true, allowCollapse:true});
});
}
</script>
</head>
<body>
<div id='chart_div'></div>
</body>
</html>
Let me know if this was helpful 👍
-Sharon
------------------------------
Quick Base Junkie
Quick Base Junkie
https://quickbasejunkie.com
------------------------------