Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/00-Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}]
Expand Down Expand Up @@ -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`

Expand Down Expand Up @@ -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`.

Expand Down Expand Up @@ -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
Expand Down
26 changes: 13 additions & 13 deletions docs/03-Bar-Chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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: |==============|
```
4 changes: 2 additions & 2 deletions docs/04-Radar-Chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions docs/05-Polar-Area-Chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions docs/07-Advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) {},
}
```

Expand Down