Skip to content

Instantly share code, notes, and snippets.

@Kyle-Fernando
Last active June 14, 2019 03:35
Show Gist options
  • Save Kyle-Fernando/e7459ea6b9c03a26d5483afc6bbbde00 to your computer and use it in GitHub Desktop.
Save Kyle-Fernando/e7459ea6b9c03a26d5483afc6bbbde00 to your computer and use it in GitHub Desktop.
Highest Office Obtained by Distinguished Triumphators

Highest Office Obtained by Distinguished Triumphators

<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['bar']});
google.charts.setOnLoadCallback(drawStuff);
function drawStuff() {
var data = new google.visualization.arrayToDataTable([
['Office Position', 'Frequency'],
['Censor', 4],
['Consul', 284],
['Dictator', 3],
['Praetor', 14],
['Quaestor', 2],
['Tribunus Militum Consulari Potestate', 1]
]);
var options = {
title: 'Chess opening moves',
width: 900,
legend: { position: 'none' },
chart: { title: 'Highest Office Obtained by Distinguished Triumphators' },
bars: 'horizontal', // Required for Material Bar Charts.
axes: {
x: {
0: { side: 'top', label: 'Frequency of Office Position'} // Top x-axis.
}
},
bar: { groupWidth: "50%" }
};
var chart = new google.charts.Bar(document.getElementById('top_x_div'));
chart.draw(data, options);
};
</script>
</head>
<body>
<div id="top_x_div" style="width: 500px; height: 1500px;"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment