From 72b0ef2df0f60516af27a7ec2b381d0d7fa2d217 Mon Sep 17 00:00:00 2001 From: Ivan Samoylenko Date: Sun, 13 Mar 2016 14:47:37 +0300 Subject: [PATCH] Missing whitespaces and code markup fixes --- docs/00-Getting-Started.md | 16 ++++++++-------- docs/03-Bar-Chart.md | 26 +++++++++++++------------- docs/04-Radar-Chart.md | 4 ++-- docs/05-Polar-Area-Chart.md | 4 ++-- docs/07-Advanced.md | 4 ++-- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/00-Getting-Started.md b/docs/00-Getting-Started.md index 77dbb26ac..c9101b828 100644 --- a/docs/00-Getting-Started.md +++ b/docs/00-Getting-Started.md @@ -80,10 +80,10 @@ var myChart = new Chart(ctx, { data: [12, 19, 3, 5, 2, 3] }] }, - options:{ - scales:{ - yAxes:[{ - ticks:{ + options: { + scales: { + yAxes: [{ + ticks: { beginAtZero:true } }] @@ -119,7 +119,7 @@ defaultFontColor | Color | '#666' | Default font color for all text defaultFontFamily | String | "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif" | Default font family for all text defaultFontSize | Number | 12 | Default font size (in px) for text. Does not apply to radialLinear scale point labels defaultFontStyle | String | 'normal' | Default font style. Does not apply to tooltip title or footer. Does not apply to chart title -legendCallback | Function | ` function (chart) { // the chart object to generate a legend from. }` | Function to generate a legend. Default implementation returns an HTML string. +legendCallback | Function | ` function (chart) { }` | Function to generate a legend. Receives the chart object to generate a legend from. Default implementation returns an HTML string. The global options for the chart title is defined in `Chart.defaults.global.title` @@ -150,7 +150,7 @@ labels |-|-|- *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(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. The global options for tooltips are defined in `Chart.defaults.global.tooltips`. @@ -203,8 +203,8 @@ Name | Type | Default | Description duration | Number | 1000 | The number of milliseconds an animation takes. easing | String | "easeOutQuart" | Easing function to use. onProgress | Function | none | Callback called on each step of an animation. Passed a single argument, an object, containing the chart instance and an object with details of the animation. -onComplete | Function | none | Callback called at the end of an animation. Passed the same arguments as `onProgress -` +onComplete | Function | none | Callback called at the end of an animation. Passed the same arguments as `onProgress` + The global options for elements are defined in `Chart.defaults.global.elements`. Name | Type | Default | Description diff --git a/docs/03-Bar-Chart.md b/docs/03-Bar-Chart.md index 010923636..58a713c59 100644 --- a/docs/03-Bar-Chart.md +++ b/docs/03-Bar-Chart.md @@ -14,7 +14,7 @@ It is sometimes used to show trend data, and the comparison of multiple data set ### Example usage ```javascript -var myBarChart = new Chart(ctx,{ +var myBarChart = new Chart(ctx, { type: 'bar', data: data, options: options @@ -108,13 +108,13 @@ You can override these for your `Chart` instance by passing a second argument in For example, we could have a bar chart without a stroke on each bar by doing the following: ```javascript -new Chart(ctx,{ - type:"bar", +new Chart(ctx, { + type: "bar", data: data, options: { scales: { xAxes: [{ - stacked: true, + stacked: true }], yAxes: [{ stacked: true @@ -137,19 +137,19 @@ The following shows the relationship between the bar percentage option and the c ```text // categoryPercentage: 1.0 // barPercentage: 1.0 -Bar: | 1.0 | 1.0 | -Category: | 1.0 | -Sample: |===========| +Bar: | 1.0 | 1.0 | +Category: | 1.0 | +Sample: |===========| // categoryPercentage: 1.0 // barPercentage: 0.5 -Bar: |.5| |.5| -Category: | 1.0 | -Sample: |==============| +Bar: |.5| |.5| +Category: | 1.0 | +Sample: |==============| // categoryPercentage: 0.5 // barPercentage: 1.0 -Bar: |1.||1.| -Category: | .5 | -Sample: |==============| +Bar: |1.||1.| +Category: | .5 | +Sample: |==============| ``` \ No newline at end of file diff --git a/docs/04-Radar-Chart.md b/docs/04-Radar-Chart.md index 358b2ee40..939a69e55 100644 --- a/docs/04-Radar-Chart.md +++ b/docs/04-Radar-Chart.md @@ -16,7 +16,7 @@ They are often useful for comparing the points of two or more different data set ```javascript var myRadarChart = new Chart(ctx, { - type:'radar', + type: 'radar', data: data, options: options }); @@ -74,7 +74,7 @@ For example, we could have a radar chart without a point for each on piece of da ```javascript new Chart(ctx, { - type:"radar", + type: "radar", data: data, options: { scale: { diff --git a/docs/05-Polar-Area-Chart.md b/docs/05-Polar-Area-Chart.md index 80210b5a4..fb2a44a3a 100644 --- a/docs/05-Polar-Area-Chart.md +++ b/docs/05-Polar-Area-Chart.md @@ -15,7 +15,7 @@ This type of chart is often useful when we want to show a comparison data simila ```javascript new Chart(ctx, { - data:data, + data: data, type: 'polarArea', options: options }); @@ -75,7 +75,7 @@ For example, we could have a polar area chart with a black stroke on each segmen ```javascript new Chart(ctx, { data: data, - type: 'polarArea', + type: "polarArea", options: { elements: { arc: { diff --git a/docs/07-Advanced.md b/docs/07-Advanced.md index 6c523f361..e272de089 100644 --- a/docs/07-Advanced.md +++ b/docs/07-Advanced.md @@ -278,14 +278,14 @@ The Core.Scale base class also has some utility functions that you may find usef ```javascript { // Returns true if the scale instance is horizontal - isHorizontal: function(){}, + isHorizontal: function() {}, // Get the correct value from the value from this.chart.data.datasets[x].data[] // If dataValue is an object, returns .x or .y depending on the return of isHorizontal() // If the value is undefined, returns NaN // Otherwise returns the value. // Note that in all cases, the returned value is not guaranteed to be a Number - getRightValue: function(dataValue){}, + getRightValue: function(dataValue) {}, } ``` -- 2.47.2