Chart.js ligne graphique ne s'affiche pas

Je me suis construit un graphique en ligne avec chart.js. Cependant, le graphique ne s'affiche pas. Voici mon code HTML

    <canvas id="myChart" width"600" height:"600"></canvas>

Voici mon code javascript. Je n'ai pas les erreurs de cette approche, mais rien ne s'affiche.

var c = $('#myChart');
var ct = c.get(0).getContext('2d');
var ctx = document.getElementById("myChart").getContext("2d").Line(data);


var data = {
labels: ["January", "February", "March", "April", "May", "June", "July","August", "November", "December"],
datasets: [
    {
        label: "Sodium intake",
        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: [165, 159, 180, 181, 156, 155, 140]
    },
    {
        label: "Sugar intake",
        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: [128, 148, 140, 119, 186, 127, 190]
    }
]

};

L'autre approche que j'ai utilisée était semblable à la documentation. J'ai instancié un nouveau graphique. Cependant, cette approche renvoie undefined pour ma ligne Graphique.

var ctx = document.getElementById("myChart").getContext("2d");
var myLineChart = new Chart(ctx).line(data,{
belzierCurve : false

});

InformationsquelleAutor Winnemucca | 2015-02-08