Sankey Diagram
A basic Sankey diagram which I want to be clickable. Slightly modified version of the example found here - https://developers.google.com/chart/interactive/docs/gallery/sankey.
by ystasyuk
HTML
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<div id="sankey_basic" style="width: 900px; height: 300px;"></div>
JavaScript
google.load('visualization', '1.1', {
packages: ['sankey']
});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'From');
data.addColumn('string', 'To');
data.addColumn('number', 'Weight');
data.addRows([
['Research 2007', 'Reader Services 2008', 1],
['Research 2007', 'Stack Maintenance & Circulation 2008', 1],
['Research 2007', 'Special Projects Team 2008', 1],
['Research 2007', 'Photo Services & Permissions 2008', 1],
['Research 2007', 'AskNYPL 2008', 1],
['Research 2007', 'General Collections 2008', 1],
['Digital Library Program 2007', 'Digital Imaging Unit 2008', 1],
['Digital Library Program 2007', 'NYPL Labs 2008', 1],
['General Collections 2008','Library Sites & Services 2008', 1],
['Library Sites & Services 2008', 'Library Services 2014', 1],
['Reader Services 2008','RRS 2008', 1],
['Stack Maintenance & Circulation 2008','RRS 2008', 1],
['Special Projects Team 2008','RRS 2008', 1],
['Photo Services & Permissions 2008','RRS 2008', 1],
['AskNYPL 2008','RRS 2008', 1],
['Digital Imaging Unit 2008','RRS 2008', 1],
['NYPL Labs 2008','RRS 2008', 1],
['RRS 2008', 'Stack Maintenance & Circulation 2011', 1],
['RRS 2008', 'Special Projects Team 2011', 1],
['RRS 2008', 'Photo Services & Permissions 2014', 1],
['RRS 2008', 'AskNYPL 2014', 1],
['RRS 2008', 'Digital Imaging Unit 2014', 1],
['RRS 2008', 'NYPL Labs 2014', 1],
['Digital Imaging Unit 2014', 'NYPL Library & Labs 2014', 1],
['Photo Services & Permissions 2014', 'NYPL Library & Labs 2014', 1],
['NYPL Labs 2014', 'NYPL Library & Labs 2014', 1],
['Research TS 2007', 'CCO 2008', 1],
['Research TS 2007', 'CCO 2008', 1],
['CCO 2008', 'BookOps 2013', 2]
]);
// Sets chart options.
var options = {
width: 1200,
sankey: { node: { nodePadding: 500 } },
...