Skip to content

Instantly share code, notes, and snippets.

@sj82516
Created December 17, 2015 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sj82516/2c0d3544ba0bf5e2ce79 to your computer and use it in GitHub Desktop.
Save sj82516/2c0d3544ba0bf5e2ce79 to your computer and use it in GitHub Desktop.
Doctype
html
head
meta(charset='utf-8')
title #{title}
script(src='/javascripts/Chart.min.js')
body
canvas#myChart
script(type="text/javascript").
var data = {
labels: ["January", "February", "March", "April", "May", "June", "July"],
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: !{chartData}
}
]
};
var ctx = document.getElementById("myChart").getContext("2d");
var myNewChart = new Chart(ctx).Line(data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment