]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Missing whitespaces and code markup fixes 2125/head
authorIvan Samoylenko <mutsmu@gmail.com>
Sun, 13 Mar 2016 11:47:37 +0000 (14:47 +0300)
committerIvan Samoylenko <mutsmu@gmail.com>
Sun, 13 Mar 2016 11:47:37 +0000 (14:47 +0300)
docs/00-Getting-Started.md
docs/03-Bar-Chart.md
docs/04-Radar-Chart.md
docs/05-Polar-Area-Chart.md
docs/07-Advanced.md

index 77dbb26ac0f36a3b65d7024763d90890a9ea8e26..c9101b828e98a0036d213510fad5f2e6d5f78166 100644 (file)
@@ -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
index 010923636e21cbf40d3a1e9632753b4b2bad1922..58a713c59f29dce0de8c2704bf59264fb936b820 100644 (file)
@@ -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
index 358b2ee40b37622c8c5e4a41fce51f0c9f2c51f3..939a69e55e2628dd31564a0ebb01a7ae7d80d9d6 100644 (file)
@@ -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: {
index 80210b5a4f4fd9e2e19a4cbf1f8fcc5915a41a28..fb2a44a3a286f56bf99b54f6250071be5d63194f 100644 (file)
@@ -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: {
index 6c523f3611f8b715045b7ddd8081a06848dc2078..e272de0891e60a15b14eb96fc87263342a2897f7 100644 (file)
@@ -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) {},
 }
 ```