javascript - Chartjs fiddle not working -


i'm new jsfiddle. i'm trying scatter chart show nothing displaying. can point me in right direction?

here's fiddle: http://jsfiddle.net/roka545/qf8ejytt/

//get context jquery - using jquery's .get() method. let canvas = <htmlcanvaselement>document.getelementbyid("mychart"); let ctx = canvas.getcontext("2d");  let xaxismin: number = 4; let xaxismax: number = 7;  var scatterchart = new chart(ctx, {     type: 'line',     data: {         datasets: [{             label: 'scatter dataset',             data: [{                 x: -10,                 y: 0             }, {                 x: 0,                 y: 10             }, {                 x: 10,                 y: 5             }]         }]     },     options: {         scales: {             xaxes: [{                 type: 'linear',                 position: 'bottom'             }]         }     } }); 

you need add link actual source such as:

https://cdnjs.cloudflare.com/ajax/libs/chart.js/2.2.1/chart.min.js 

in external resources, press plus button.

see here:

http://jsfiddle.net/r7ahsn15/


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -