Skip to content

Instantly share code, notes, and snippets.

@marvinahv
Created November 18, 2012 00:50
Show Gist options
  • Save marvinahv/4102136 to your computer and use it in GitHub Desktop.
Save marvinahv/4102136 to your computer and use it in GitHub Desktop.
Google Org Visualization from JSON
drawChart = ->
$.getJSON '/js/org.json', (json) ->
data = new google.visualization.DataTable(json)
chart = new google.visualization.OrgChart(document.getElementById('org'))
chart.draw data,
allowHtml: true
nodeClass: 'org-node'
selectedNodeClass: 'org-node-selected'
google.load('visualization', '1', { packages:['orgchart']})
google.setOnLoadCallback(drawChart)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment