JavaScript
var data = {
labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
datasets: [
{
label: "My First dataset",
fillColor: "rgba(220,220,220,0.2)",
strokeColor: "rgba(220,220,220,1)",
pointColor: "rgba(220,220,220,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(220,220,220,1)",
data: [5, 5, 9, 81, 56, 55, 40]
}
]
};
var ctx = document.getElementById("myChart").getContext("2d");
var myChart = new Chart(ctx).Line(data);
var data2 = {
labels: ["Eating2", "Drinking2", "Sleeping2", "Designing2", "Coding2", "Cycling2", "Running2"],
datasets: [
{
label: "My First dataset",
fillColor: "rgba(220,220,220,0.2)",
strokeColor: "rgba(220,220,220,1)",
pointColor: "rgba(220,220,220,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(220,220,220,1)",
data: [15, 15, 19, 181, 156, 155, 140]
}
]
};
var ctx = document.getElementById("myChart2").getContext("2d");
var myChart = new Chart(ctx).Line(data2);
Chart.helpers.each(Chart.instances, function(instance){
console.log(instance.chart.canvas)
})