score:2

example

var mylinechart = new chart(ctx).line(data, options);

data structure

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: [65, 59, 80, 81, 56, 55, 40]
        },
        {
            label: "my second dataset",
            fillcolor: "rgba(151,187,205,0.2)",
            strokecolor: "rgba(151,187,205,1)",
            pointcolor: "rgba(151,187,205,1)",
            pointstrokecolor: "#fff",
            pointhighlightfill: "#fff",
            pointhighlightstroke: "rgba(151,187,205,1)",
            data: [28, 48, 40, 19, 86, 27, 90]
        }
    ]
};

you can see the documentation from this link chartjs-linechart


Related Query