From fa2784273633a10bdf39dd7e6343e351169d356e Mon Sep 17 00:00:00 2001 From: Nick Downie Date: Mon, 18 Apr 2016 22:30:10 +0100 Subject: [PATCH] Split doughnut/pie example into two code block Odd change - but makes tempting the documentation a lot simpler --- docs/06-Pie-Doughnut-Chart.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 }); -- 2.47.2