Built with blockbuilder.org
Created
April 25, 2018 18:42
-
-
Save scampbell2434/a5d85943d7b9970ba7fd4c722170e573 to your computer and use it in GitHub Desktop.
Fossil graph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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