Skip to content

Commit

Permalink
Fix some errors with docs that were noticed when building
Browse files Browse the repository at this point in the history
  • Loading branch information
etimberg committed Dec 28, 2015
1 parent e2206ab commit 5a5d698
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
21 changes: 10 additions & 11 deletions docs/01-Scales.md
@@ -1,14 +1,13 @@
---
title: Getting started
title: Scales
anchor: scales
---

###Scales

Scales in v2.0 of Chart.js are significantly more powerful, but also different than those of v1.0.
- Multiple x & y axes are now supported.
- A built-in label auto-skip feature now detects would-be overlapping ticks and labels and removes every nth label to keep things displaying normally.
- Scale titles are now supported
* Multiple x & y axes are now supported.
* A built-in label auto-skip feature now detects would-be overlapping ticks and labels and removes every nth label to keep things displaying normally.
* Scale titles are now supported
* New scale types can be extended without writing an entirely new chart type

Every scale extends a core scale class with the following options:

Expand Down Expand Up @@ -82,7 +81,7 @@ The `callback` method may be used for advanced tick customization. The following
}
```

#### Category Scale
### Category Scale
The category scale will be familiar to those who have used v1.0. Labels are drawn in from the labels array included in the chart data.

The category scale extends the core scale class with the following tick template:
Expand All @@ -93,7 +92,7 @@ The category scale extends the core scale class with the following tick template
}
```

#### Linear Scale
### Linear Scale
The linear scale can be used to display numerical data. It can be placed on either the x or y axis. The scatter chart type automatically configures a line chart to use one of these scales for the x axis.

The linear scale extends the core scale class with the following tick template:
Expand Down Expand Up @@ -130,7 +129,7 @@ The linear scale extends the core scale class with the following tick template:
}
```

#### Logarithmic Scale
### Logarithmic Scale
The logarithmic scale is used to display logarithmic data of course. It can be placed on either the x or y axis.

The log scale extends the core scale class with the following tick template:
Expand All @@ -152,7 +151,7 @@ The log scale extends the core scale class with the following tick template:
}
```

#### Time Scale
### Time Scale
The time scale is used to display times and dates. It can be placed on the x axis. When building its ticks, it will automatically calculate the most comfortable unit base on the size of the scale.

The time scale extends the core scale class with the following tick template:
Expand Down Expand Up @@ -229,7 +228,7 @@ The following time measurements are supported:
}
```

#### Radial Linear Scale
### Radial Linear Scale
The radial linear scale is used specifically for the radar chart type.

The radial linear scale extends the core scale class with the following tick template:
Expand Down
11 changes: 5 additions & 6 deletions docs/04-Radar-Chart.md
Expand Up @@ -3,7 +3,7 @@ title: Radar Chart
anchor: radar-chart
---

###Introduction
### Introduction
A radar chart is a way of showing multiple data points and the variation between them.

They are often useful for comparing the points of two or more different data sets.
Expand All @@ -12,7 +12,7 @@ They are often useful for comparing the points of two or more different data set
<canvas width="250" height="125"></canvas>
</div>

###Example usage
### Example usage

```javascript
var myRadarChart = new Chart(ctx, {
Expand All @@ -22,7 +22,7 @@ var myRadarChart = new Chart(ctx, {
});
```

###Data structure
### Data structure
```javascript
var data = {
labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
Expand Down Expand Up @@ -52,10 +52,10 @@ var data = {
```
For a radar chart, to provide context of what each point means, we include an array of strings that show around each point in the chart.
For the radar chart data, we have an array of datasets. Each of these is an object, with a fill colour, a stroke colour, a colour for the fill of each point, and a colour for the stroke of each point. We also have an array of data values.

The label key on each dataset is optional, and can be used when generating a scale for the chart.

### Chart options

### Chart Options

These are the customisation options specific to Radar charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.

Expand Down Expand Up @@ -91,4 +91,3 @@ new Chart(ctx, {
```

We can also change these defaults values for each Radar type that is created, this object is available at `Chart.defaults.radar`.

4 changes: 2 additions & 2 deletions docs/07-Advanced.md
Expand Up @@ -96,7 +96,7 @@ myLineChart.generateLegend();

Calling `getElementAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the single element at the event position. If there are multiple items within range, only the first is returned

```javscript
```javascript
myLineChart.getElementAtEvent(e);
// => returns the first element at the event point.
```
Expand Down Expand Up @@ -275,7 +275,7 @@ Optionally, the following methods may also be overwritten, but an implementation
```

The Core.Scale base class also has some utility functions that you may find useful.
```javscript
```javascript
{
// Returns true if the scale instance is horizontal
isHorizontal: function(){},
Expand Down

0 comments on commit 5a5d698

Please sign in to comment.