2015-05-18 102 views
2
var data1 = { 
     labels: JSON.parse('<?php echo JSON_encode($bioc_months);?>'), 
     datasets: [{ 
       fillColor: "rgba(220,220,220,0.5)", 
       strokeColor: "rgba(220,220,220,1)", 
       pointColor: "rgba(220,220,220,1)", 
       pointStrokeColor: "#fff", 
       data: 1000, 
       900, 
       90, 
       200, 
       1020 
      }, { 
       fillColor: "rgba(151,187,205,0.5)", 
       strokeColor: "rgba(151,187,205,1)", 
       pointColor: "rgba(151,187,205,1)", 
       pointStrokeColor: "#fff", 
       data: 600, 
       456, 
       20, 
       2, 
       900 
      ] 
     }; 

     var opt1 = { 
      canvasBordersWidth: 3, 
      canvasBordersColor: "#205081", 
      scaleOverride: true, 
      scaleSteps: 6, 
      scaleStepWidth: log2, 
      scaleStartValue: 0, 
      scaleLabel: "<%=value%>", 
      legend: true, 
      inGraphDataShow: true, 
      annotateDisplay: true, 
      inGraphDataShow: false, 
      annotateDisplay: true, 
      animationEasing: "easeOutBounce", 
      graphTitleFontSize: 18 
     }; 

     var myBarChart1 = new Chart(ctx1).Bar(data1, opt1); 
+1

非常暴力的「問題」,它只是代碼。 –

回答

-1

ChartJS版本2具有此功能。