Missing whitespaces and code markup fixes

This commit is contained in:
Ivan Samoylenko 2016-03-13 14:47:37 +03:00
parent 1fbbdd2d38
commit 72b0ef2df0
5 changed files with 27 additions and 27 deletions

View 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

View 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: |==============|
```

View 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: {

View 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: {

View 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) {},
}
```