]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Split doughnut/pie example into two code block 2293/head
authorNick Downie <nick@nickdownie.com>
Mon, 18 Apr 2016 21:30:10 +0000 (22:30 +0100)
committerNick Downie <nick@nickdownie.com>
Mon, 18 Apr 2016 21:30:10 +0000 (22:30 +0100)
Odd change - but makes tempting the documentation a lot simpler

docs/06-Pie-Doughnut-Chart.md

index 64fd9b8a42eb9a964136ab2f56ff054282385c69..b54c1bcfefd536477e45a1f61467c9e5051772e2 100644 (file)
@@ -24,15 +24,17 @@ They are also registered under two aliases in the `Chart` core. Other than their
 
 ```javascript
 // For a pie chart
-var myPieChart = new Chart(ctx[0],{
-       type:'pie',
+var myPieChart = new Chart(ctx,{
+       type: 'pie',
        data: data,
        options: options
 });
+```
 
+```javascript
 // And for a doughnut chart
-var myDoughnutChart = new Chart(ctx[1], {
-       type:'doughnut',
+var myDoughnutChart = new Chart(ctx, {
+       type: 'doughnut',
        data: data,
        options: options
 });