From ad9f40f841d1f260cab13a25e619198431d76765 Mon Sep 17 00:00:00 2001 From: Darren Keane Date: Thu, 5 May 2016 16:57:50 +0100 Subject: [PATCH] Update legend docs -> parameter 'data' has changed to 'chart'. --- docs/00-Getting-Started.md | 2 +- docs/06-Pie-Doughnut-Chart.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/00-Getting-Started.md b/docs/00-Getting-Started.md index 24ee0a5cb..4f299d591 100644 --- a/docs/00-Getting-Started.md +++ b/docs/00-Getting-Started.md @@ -151,7 +151,7 @@ labels |Object|-|- *labels*.fontColor | Color | "#666" | *labels*.fontFamily | String | "Helvetica Neue" | *labels*.padding | Number | 10 | Padding between rows of colored boxes -*labels*.generateLabels: | Function | `function(data) { }` | Generates legend items for each thing in the legend. Default implementation returns the text + styling for the color box. Styles that can be returned are `fillStyle`, `strokeStyle`, `lineCap`, `lineDash`, `lineDashOffset`, `lineWidth`, `lineJoin`. Return a `hidden` attribute to indicate that the label refers to something that is not visible. A strikethrough style will be given to the text in this case. +*labels*.generateLabels: | Function | `function(chart) { }` | Generates legend items for each thing in the legend. Default implementation returns the text + styling for the color box. Styles that can be returned are `fillStyle`, `strokeStyle`, `lineCap`, `lineDash`, `lineDashOffset`, `lineWidth`, `lineJoin`. Return a `hidden` attribute to indicate that the label refers to something that is not visible. A strikethrough style will be given to the text in this case. The global options for tooltips are defined in `Chart.defaults.global.tooltips`. diff --git a/docs/06-Pie-Doughnut-Chart.md b/docs/06-Pie-Doughnut-Chart.md index b96816cc9..05487069b 100644 --- a/docs/06-Pie-Doughnut-Chart.md +++ b/docs/06-Pie-Doughnut-Chart.md @@ -92,7 +92,7 @@ rotation | Number | -0.5 * Math.PI | Starting angle to draw arcs from circumference | Number | 2 * Math.PI | Sweep to allow arcs to cover *animation*.animateRotate | Boolean |true | If true, will animate the rotation of the chart. *animation*.animateScale | Boolean | false | If true, will animate scaling the Doughnut from the centre. -*legend*.*labels*.generateLabels | Function | `function(data) {} ` | Returns labels for each the legend +*legend*.*labels*.generateLabels | Function | `function(chart) {} ` | Returns a label for each item to be displayed on the legend. *legend*.onClick | Function | function(event, legendItem) {} ` | Handles clicking an individual legend item You can override these for your `Chart` instance by passing a second argument into the `Doughnut` method as an object with the keys you want to override. -- 2.47.2