From: Nick Downie Date: Mon, 18 Apr 2016 21:30:10 +0000 (+0100) Subject: Split doughnut/pie example into two code block X-Git-Tag: 2.1.0~64^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2293%2Fhead;p=thirdparty%2FChart.js.git Split doughnut/pie example into two code block Odd change - but makes tempting the documentation a lot simpler --- diff --git a/docs/06-Pie-Doughnut-Chart.md b/docs/06-Pie-Doughnut-Chart.md index 64fd9b8a4..b54c1bcfe 100644 --- a/docs/06-Pie-Doughnut-Chart.md +++ b/docs/06-Pie-Doughnut-Chart.md @@ -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 });