MediaWiki:GovHistRep

 

google.setOnLoadCallback(drawChart); function drawChart { var container = document.getElementById('example5.3'); var chart = new google.visualization.Timeline(container); var dataTable = new google.visualization.DataTable; dataTable.addColumn({ type: 'string', id: 'Room' }); dataTable.addColumn({ type: 'string', id: 'Name' }); dataTable.addColumn({ type: 'date', id: 'Start' }); dataTable.addColumn({ type: 'date', id: 'End' }); dataTable.addRows([   [ 'Head of State', 'Therserus White (Libertarian)',    new Date(1800,3,1),  new Date(1805,3,1) ],    [ 'Head of State', 'Therserus White (Libertarian)',    new Date(1805,3,1),  new Date(1810,3,1) ],    [ 'Coalition 1', 'Libertarian-Federalist-Republican',    new Date(1800,3,1),  new Date(1805,3,1) ],    [ 'Coalition 1', 'Libertarian-Federalist-Republican',    new Date(1805,3,1),  new Date(1810,3,1) ],    [ 'Coalition 2', 'For People-New Lurk',    new Date(1800,3,1),  new Date(1805,3,1) ],    [ 'Coalition 2', 'Republican-Blue Faction',    new Date(1805,3,1),  new Date(1810,3,1) ], ]);

var options = { timeline: { colorByRowLabel: true }, backgroundColor: '#ffd' };

chart.draw(dataTable, options); }