cohort-graph
Version:
Cohort Analysis Graph
97 lines (87 loc) • 3.5 kB
HTML
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width,maximum-scale=2">
<meta name="description" content="{{ site.title | default: site.github.repository_name }} : {{ site.description | default: site.github.project_tagline }}">
<link rel="stylesheet" type="text/css" media="screen" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<title>{{ site.title | default: site.github.repository_name }}</title>
<style>
.outer{
min-width: 70%;
}
</style>
</head>
<body>
<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<a id="forkme_banner" href="{{ site.github.repository_url }}">View on GitHub</a>
<h1 id="project_title">{{ site.title | default: site.github.repository_name }}</h1>
<h2 id="project_tagline">{{ site.description | default: site.github.project_tagline }}</h2>
{% if site.show_downloads %}
<section id="downloads">
<a class="zip_download_link" href="{{ site.github.zip_url }}">Download this project as a .zip file</a>
<a class="tar_download_link" href="{{ site.github.tar_url }}">Download this project as a tar.gz file</a>
</section>
{% endif %}
</header>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<div style="padding: 20px">
<div id="root"></div>
</div>
{{ content }}
</section>
</div>
<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
{% if site.github.is_project_page %}
<p class="copyright">{{ site.title | default: site.github.repository_name }} maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
{% endif %}
<p>Published with <a href="https://pages.github.com">GitHub Pages</a></p>
</footer>
</div>
{% if site.google_analytics %}
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
<script src="lib/cohortgraph.js"></script>
<script>
var data = {
days : {
"22-05-2016": [200, 160, 90, 30, 40, 10, 20, 20],
"23-05-2016": [300, 200, 150, 50, 20, 20, 90],
"24-05-2016": [200, 110, 150, 50, 10, 20],
"25-05-2016": [200, 120, 60, 30, 10],
"26-05-2016": [300, 90, 40, 30],
"27-05-2016": [200, 80, 30],
"28-05-2016": [300, 180],
"29-05-2016": [200]
},
weeks : {
"week1": [200, 10, 20],
"week2": [300, 200],
"week3": [200]
},
months : {
"month1": [200, 10, 20, 30],
"month2": [300, 200, 150],
"month3": [200, 110],
"month4": [100]
}
};
var graph = new CohortGraph(document.getElementById("root"), data);
</script>
</body>
</html>