Skip to content

Instantly share code, notes, and snippets.

@coffeejay
Created July 7, 2017 20:31
Show Gist options
  • Select an option

  • Save coffeejay/2bc65761c38a57fd73eb26cb6ef95d22 to your computer and use it in GitHub Desktop.

Select an option

Save coffeejay/2bc65761c38a57fd73eb26cb6ef95d22 to your computer and use it in GitHub Desktop.
<canvas id="myChart2" height="100px"></canvas>
$(function () {
var ctx2 = document.getElementById("myChart2");
var data2 = {
labels: ['Jan', 'Feb', 'Mar', 'May', 'Jun', 'Jul', 'Aug'],
datasets: [{
label: 'Actual',
data: [12, 19, 3, 17, 6, 3, 7],
backgroundColor: "rgba(94,178,94,0.7)"
}, {
label: 'Projected',
data: [2, 29, 5, 5, 2, 3, 10],
backgroundColor: "rgba(186, 242, 186,0.7)"
}]
}
var options2 = {showLines:true}
var myLineChart = new Chart(ctx2, {
type: 'line',
data: data2,
options: options2
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment