Skip to content

Instantly share code, notes, and snippets.

@scampbell2434
Created April 25, 2018 18:42
Show Gist options
  • Save scampbell2434/a5d85943d7b9970ba7fd4c722170e573 to your computer and use it in GitHub Desktop.
Save scampbell2434/a5d85943d7b9970ba7fd4c722170e573 to your computer and use it in GitHub Desktop.
Fossil graph
license: mit
<html>
<head>
<script>
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer", {
animationEnabled: true,
title:{
text:"Fortune 500 Companies by Country"
},
axisX:{
interval: 1
},
axisY2:{
interlacedColor: "rgba(1,77,101,.2)",
gridColor: "rgba(1,77,101,.1)",
title: "Number of fossils"
},
data: [{
type: "bar",
name: "companies",
axisYType: "secondary",
color: "#014D65",
dataPoints: [
{ y: 2, label: "Carboniferous" },
{ y: 7, label: "Cretaceous" },
{ y: 1, label: "Early Creataceous" },
{ y: 1, label: "Eocene" },
{ y: 20, label: "Jurassic" },
{ y: 4, label: "Late Creataceous" },
{ y: 1, label: "Late Jurassic" },
{ y: 2, label: "Miocene" },
{ y: 1, label: "Neogene" },
{ y: 25, label: "Permian" },
{ y: 10, label: "Quaternary" },
{ y: 3, label: "Recent" },
{ y: 7, label: "Silurian" },
{ y: 6, label: "Triassic" },
]
}]
});
chart.render();
}
</script>
</head>
<body>
<div id="chartContainer" style="height: 300px; width: 100%;"></div>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment