tthe syntax is different if you are using chart.js v1 or v2.

you imported the v1.02 library using <script src=""></script>.

but you actually used the v2 syntax :

var mychart = new chart(ctx, {
    type: 'line',
    data: data_live,
    options: live_options

you can fix this by importing the right library (which is the v2) :

<!-- the following is the latest version of chart.js -->
<script src=""></script>

Related Query

More Query from same tag