-
-
Save rysuq/adc2c26c2264e0e0af08bdd437e97a4e to your computer and use it in GitHub Desktop.
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"> | |
<script src='static/chart.min.js'></script> | |
<!-- Bootstrap core CSS --> | |
<link href="{{ url_for('static', filename='bootstrap.min.css') }}" rel="stylesheet"> | |
<style> | |
</style> | |
</head> | |
<body> | |
<canvas id="canvas"></canvas> | |
<!-- Bootstrap core JavaScript --> | |
<script src="{{ url_for('static', filename='jquery.slim.min.js') }}"></script> | |
<script src="{{ url_for('static', filename='bootstrap.bundle.min.js') }}"></script> | |
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script> | |
<script> | |
var config = { | |
type: 'line', | |
data: { | |
xLabels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], | |
yLabels: ['', 'Request Added', 'Request Viewed', 'Request Accepted', 'Request Solved', 'Solving Confirmed'], | |
datasets: [{ | |
label: 'My First dataset', | |
data: ['', 'Request Added', 'Request Added', 'Request Added', 'Request Viewed', 'Request Viewed', 'Request Viewed'], | |
fill: false | |
}] | |
}, | |
options: { | |
responsive: true, | |
title: { | |
display: true, | |
text: 'Chart with Non Numeric Y Axis' | |
}, | |
scales: { | |
x: { | |
display: true, | |
scaleLabel: { | |
display: true, | |
labelString: 'Month' | |
} | |
}, | |
y: { | |
type: 'category', | |
position: 'left', | |
display: true, | |
scaleLabel: { | |
display: true, | |
labelString: 'Request State' | |
}, | |
reverse: true | |
} | |
} | |
} | |
}; | |
var ctx = document.getElementById('canvas').getContext('2d'); | |
window.myLine = new Chart(ctx, config); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment