Q:

Chart.js - generateLegend() call results in "undefined is not a function"

When I attempt to call generateLegened() on my chart:
var ctx = $("#chart").get(0).getContext("2d");
var ctxOptions = {
    responsive: false,
    legendTemplate: "<ul>LEGEND</ul>"
};
var chart = new Chart(ctx);

chart.Line(data, ctxOptions);
var legend = chart.generateLegend();

it errors with:
Uncaught TypeError: undefined is not a function
on the chart.GenerateLegend() line.
I'm completely confused as to what the problem it. The function is clearly in the .js file being included.
I'm using this script: //cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.1/Chart.min.js
Is this a bug, or can someone tell me what I'm doing wrong?
Thanks

A:

Interestingly, if I change the code as follows:
var chart = new Chart(ctx).Line(data, ctxOptions);

the legend works as expected!?
A bug with chart.js?

