ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 图表 参考文档: [http://www.bootcss.com/p/chart.js/docs/](http://www.bootcss.com/p/chart.js/docs/) ![](https://box.kancloud.cn/2016-06-29_5773849221443.png) ## 使用 ``` <canvas id="myChart" width="400" height="400"></canvas> <script> require(['util'], function (hd) { var chartData = { labels : ["后盾网","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] } ] } hd.chart({ element:'#myChart',//canvas元素 type:'Bar',//图表类型,其他类型参考插件官网 data:chartData//图表数据 }); }) </script> ```