为了账号安全,请及时绑定邮箱和手机立即绑定

引入Chart.js文件后,仍然无法输出数据表是怎么回事?

引入Chart.js文件后,仍然无法输出数据表是怎么回事?

慕斯709654 2019-02-21 02:21:10
是我这个写法有问题吗? Chart.js <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <script src="/js/Chart.js"></script> <script> var ctx = document.getElementById("myChart").getContext("2d"); var data = { labels : ["January","February","March","April","May","June","July"], datasets : [ { fillColor : "rgba(220,220,220,0.5)", strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220,220,220,1)", pointStrokeColor : "#fff", data : [65,59,90,81,56,55,40] }, { fillColor : "rgba(151,187,205,0.5)", strokeColor : "rgba(151,187,205,1)", pointColor : "rgba(151,187,205,1)", pointStrokeColor : "#fff", data : [28,48,40,19,96,27,100] } ] } var myNewChart = new Chart(ctx).Line(data); </script> <title></title> </head> <body> <canvas id="myChart" width="400" height="400"></canvas> </body> </html>
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 743 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信