Straight from https://frappe.github.io/charts/.
Last active
November 7, 2017 15:16
-
-
Save Fil/e0e862c46b4fe5087f28c6f601772d78 to your computer and use it in GitHub Desktop.
frappe!
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; font-family: sans-serif} | |
</style> | |
</head> | |
<body> | |
<script src="https://unpkg.com/frappe-charts"></script> | |
<div id="chart"></div> | |
<script> | |
let data = { | |
labels: ["12am-3am", "3am-6am", "6am-9am", "9am-12pm", | |
"12pm-3pm", "3pm-6pm", "6pm-9pm", "9pm-12am"], | |
datasets: [ | |
{ | |
title: "Some Data", color: "light-blue", | |
values: [25, 40, 30, 35, 8, 52, 17, -4] | |
}, | |
{ | |
title: "Another Set", color: "violet", | |
values: [25, 50, -10, 15, 18, 32, 27, 14] | |
}, | |
{ | |
title: "Yet Another", color: "blue", | |
values: [15, 20, -3, -15, 58, 12, -17, 37] | |
} | |
] | |
}; | |
let chart = new Chart({ | |
parent: "#chart", | |
title: "My Awesome Chart", | |
data: data, | |
type: 'bar', // or 'line', 'scatter', 'pie', 'percentage' | |
height: 250 | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment