Question: I am trying to declare a new chart using [chart.js](http://www.chartjs.org/), but the chart is not rendering.

I originally tried declaring it using:

```
new Chart(ctx).Pie(data);

```

However, that code gave me the following error:

> 
> Uncaught TypeError: (intermediate value).Pie is not a function
> 
> 
> 

I tried changing the code to: 

```
new Chart(ctx , {
    type: "pie",
    data: data,
});

```

This caused the error to disappear, yet the chart still doesn't render.

I've tried using different browsers and the same issue still occurs. 

JSFiddle link: <https://jsfiddle.net/pv77779y/>

Any help with getting the chart to render would be massively appreciated.

Answer: 
I was facing a similar issue wherein the chart.js documentation was not helpful. Then I noticed that the chart.min.js version should be the latest one. This day we use 2.5+ and the documentation is for that version. 

So try replacing the file, and reloading your page (conforming to documents of chart.min.js 2.5+)
How you created your context? It should be 

```
var ctx = document.getElementById("myChart");

```