score:1

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

you imported the v1.02 library using <script src="http://www.chartjs.org/assets/chart.js"></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="https://cdnjs.cloudflare.com/ajax/libs/chart.js/2.3.0/chart.min.js"></script>

Related Query

More Query from same tag