我该如何重复四次图表?

时间:2017-04-13 12:42:05

标签: javascript chart.js

我需要在我的网站上使用chars.js库中的四个图表 目前有一个图表的代码

   $(function () {
   $(".chart").drawDoughnutChart([
          {value: volume, color: "#2980b9", text: volume},
          {value: rest, color: "#d2d4d8", text: volume},
    ]);
          volume = volume - 10; // For TEST filling
          rest = rest + 10; // For TEST filling 
   });

(function ($, undefined) {
            $.fn.drawDoughnutChart = function (data, options) {
                var $this = this,
                        W = $this.width(),
                        H = $this.height(),
//other property include text under one chart

我应该为每张图表重复上述方法3次以上或最佳方式如何? 谢谢:))

0 个答案:

没有答案