Sample for chartjs pull request #4117
HTML
<script src="https://rawgit.com/2Ring/Chart.js/t5001-jsFiddle/dist/Chart.bundle.js"></script>
<body>
<canvas id="chartJSContainer" width="600" height="400"></canvas>
</body>
CSS
canvas { background-color : #eee;
}
JavaScript
var options = {
type: 'line',
data: {
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
datasets: [
{
label: '# of Votes',
data: [12, 19, 3, 5, 2, 3],
borderWidth: 1
},
{
label: '# of Points',
data: [7, 11, 5, 8, 3, 7],
borderWidth: 1
}
]
},
options: {
scales: {
xAxes: [{
borderWidth: 1,
borderColor: 'red',
gridLines: {
color: 'green',
zeroLineColor: 'orange'
}
}],
yAxes: [{
gridLines: {
color: 'blue'
}
}]
}
}
}
var ctx = document.getElementById('chartJSContainer').getContext('2d');
new Chart(ctx, options);