Skip to content

Commit 4360e0e

Browse files
committed
Fix broken documentation anchors
1 parent 6e9e52a commit 4360e0e

File tree

7 files changed

+54
-48
lines changed

7 files changed

+54
-48
lines changed

docs/axes/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Scales in Chart.js >v2.0 are significantly more powerful, but also different tha
1010
* Scale titles are supported.
1111
* New scale types can be extended without writing an entirely new chart type.
1212

13-
# Common Configuration
13+
## Common Configuration
1414

1515
The following properties are common to all axes provided by Chart.js.
1616

@@ -20,7 +20,7 @@ The following properties are common to all axes provided by Chart.js.
2020
| `callbacks` | `object` | | Callback functions to hook into the axis lifecycle. [more...](#callbacks)
2121
| `weight` | `number` | `0` | The weight used to sort the axis. Higher weights are further away from the chart area.
2222

23-
## Callbacks
23+
### Callbacks
2424
There are a number of config callbacks that can be used to change parameters in the scale at different points in the update process.
2525

2626
| Name | Arguments | Description
@@ -40,7 +40,7 @@ There are a number of config callbacks that can be used to change parameters in
4040
| `afterFit` | `axis` | Callback that runs after the scale fits to the canvas.
4141
| `afterUpdate` | `axis` | Callback that runs at the end of the update process.
4242

43-
## Updating Axis Defaults
43+
### Updating Axis Defaults
4444

4545
The default configuration for a scale can be easily changed using the scale service. All you need to do is to pass in a partial configuration that will be merged with the current scale default configuration to form the new default.
4646

docs/axes/cartesian/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Axes that follow a cartesian grid are known as 'Cartesian Axes'. Cartesian axes
77
* [category](./category.md#category-cartesian-axis)
88
* [time](./time.md#time-cartesian-axis)
99

10-
# Common Configuration
10+
## Common Configuration
1111

1212
All of the included cartesian axes support a number of common options.
1313

@@ -21,7 +21,7 @@ All of the included cartesian axes support a number of common options.
2121
| `scaleLabel` | `object` | | Scale title configuration. [more...](../labelling.md#scale-title-configuration)
2222
| `ticks` | `object` | | Tick configuration. [more...](#tick-configuration)
2323

24-
## Tick Configuration
24+
### Tick Configuration
2525
The following options are common to all cartesian axes but do not apply to other axes.
2626

2727
| Name | Type | Default | Description
@@ -34,7 +34,7 @@ The following options are common to all cartesian axes but do not apply to other
3434
| `mirror` | `boolean` | `false` | Flips tick labels around axis, displaying the labels inside the chart instead of outside. *Note: Only applicable to vertical scales.*
3535
| `padding` | `number` | `10` | Padding between the tick label and the axis. When set on a vertical axis, this applies in the horizontal (X) direction. When set on a horizontal axis, this applies in the vertical (Y) direction.
3636

37-
## Axis ID
37+
### Axis ID
3838
The properties `dataset.xAxisID` or `dataset.yAxisID` have to match the scale properties `scales.xAxes.id` or `scales.yAxes.id`. This is especially needed if multi-axes charts are used.
3939

4040
```javascript
@@ -63,7 +63,7 @@ var myChart = new Chart(ctx, {
6363
});
6464
```
6565

66-
# Creating Multiple Axes
66+
## Creating Multiple Axes
6767

6868
With cartesian axes, it is possible to create multiple X and Y axes. To do so, you can add multiple configuration objects to the `xAxes` and `yAxes` properties. When adding new axes, it is important to ensure that you specify the type of the new axes as default types are **not** used in this case.
6969

docs/charts/bar.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ You can also specify the dataset as x/y coordinates when using the [time scale](
206206
data: [{x:'2016-12-25', y:20}, {x:'2016-12-26', y:10}]
207207
```
208208

209-
# Stacked Bar Chart
209+
## Stacked Bar Chart
210210

211211
Bar charts can be configured into stacked bar charts by changing the settings on the X and Y axes to enable stacking. Stacked bar charts can be used to show how one data series is made up of a number of smaller pieces.
212212

@@ -227,15 +227,13 @@ var stackedBar = new Chart(ctx, {
227227
});
228228
```
229229

230-
## Dataset Properties
231-
232230
The following dataset properties are specific to stacked bar charts.
233231

234232
| Name | Type | Description
235233
| ---- | ---- | -----------
236234
| `stack` | `string` | The ID of the group to which this dataset belongs to (when stacked, each group will be a separate stack).
237235

238-
# Horizontal Bar Chart
236+
## Horizontal Bar Chart
239237
A horizontal bar chart is a variation on a vertical bar chart. It is sometimes used to show trend data, and the comparison of multiple data sets side by side.
240238
{% chartjs %}
241239
{
@@ -288,7 +286,7 @@ var myBarChart = new Chart(ctx, {
288286
});
289287
```
290288

291-
## Config Options
289+
### Config Options
292290
The configuration options for the horizontal bar chart are the same as for the [bar chart](#scale-configuration). However, any options specified on the x axis in a bar chart, are applied to the y axis in a horizontal bar chart.
293291

294292
The default horizontal bar configuration is specified in `Chart.defaults.horizontalBar`.

docs/charts/line.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ data: [{
190190

191191
This alternate is used for sparse datasets, such as those in [scatter charts](./scatter.md#scatter-chart). Each data point is specified using an object containing `x` and `y` properties.
192192

193-
# Stacked Area Chart
193+
## Stacked Area Chart
194194

195195
Line charts can be configured into stacked area charts by changing the settings on the y axis to enable stacking. Stacked area charts can be used to show how one data trend is made up of a number of smaller pieces.
196196

@@ -208,17 +208,17 @@ var stackedLine = new Chart(ctx, {
208208
});
209209
```
210210

211-
# High Performance Line Charts
211+
## High Performance Line Charts
212212

213213
When charting a lot of data, the chart render time may start to get quite large. In that case, the following strategies can be used to improve performance.
214214

215-
## Data Decimation
215+
### Data Decimation
216216

217217
Decimating your data will achieve the best results. When there is a lot of data to display on the graph, it doesn't make sense to show tens of thousands of data points on a graph that is only a few hundred pixels wide.
218218

219219
There are many approaches to data decimation and selection of an algorithm will depend on your data and the results you want to achieve. For instance, [min/max](https://digital.ni.com/public.nsf/allkb/F694FFEEA0ACF282862576020075F784) decimation will preserve peaks in your data but could require up to 4 points for each pixel. This type of decimation would work well for a very noisy signal where you need to see data peaks.
220220

221-
## Disable Bezier Curves
221+
### Disable Bezier Curves
222222

223223
If you are drawing lines on your chart, disabling bezier curves will improve render times since drawing a straight line is more performant than a bezier curve.
224224

@@ -238,7 +238,7 @@ new Chart(ctx, {
238238
});
239239
```
240240

241-
## Disable Line Drawing
241+
### Disable Line Drawing
242242

243243
If you have a lot of data points, it can be more performant to disable rendering of the line for a dataset and only draw points. Doing this means that there is less to draw on the canvas which will improve render performance.
244244

@@ -258,7 +258,7 @@ new Chart(ctx, {
258258
});
259259
```
260260

261-
## Disable Animations
261+
### Disable Animations
262262

263263
If your charts have long render times, it is a good idea to disable animations. Doing so will mean that the chart needs to only be rendered once during an update instead of multiple times. This will have the effect of reducing CPU usage and improving general page performance.
264264

docs/developers/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
Developer features allow extending and enhancing Chart.js in many different ways.
44

5-
# Latest resources
5+
## Latest resources
66

77
Latest documentation and samples, including unreleased features, are available at:
88

99
- https://www.chartjs.org/docs/master/
1010
- https://www.chartjs.org/samples/master/
1111

12-
# Development releases
12+
## Development releases
1313

1414
Latest builds are available for testing at:
1515

@@ -20,7 +20,7 @@ Latest builds are available for testing at:
2020
2121
**WARNING: Development builds MUST not be used for production purposes or as replacement for CDN.**
2222

23-
# Browser support
23+
## Browser support
2424

2525
Chart.js offers support for the following browsers:
2626
* Chrome 50+
@@ -33,7 +33,7 @@ Browser support for the canvas element is available in all modern & major mobile
3333

3434
Thanks to [BrowserStack](https://browserstack.com) for allowing our team to test on thousands of browsers.
3535

36-
# Previous versions
36+
## Previous versions
3737

3838
Version 2 has a completely different API than earlier versions.
3939

docs/developers/contributing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ New contributions to the library are welcome, but we ask that you please follow
99
- Avoid breaking changes unless there is an upcoming major release, which are infrequent. We encourage people to write plugins for most new advanced features, and care a lot about backwards compatibility.
1010
- We strongly prefer new methods to be added as private whenever possible. A method can be made private either by making a top-level `function` outside of a class or by prefixing it with `_` and adding `@private` JSDoc if inside a class. Public APIs take considerable time to review and become locked once implemented as we have limited ability to change them without breaking backwards compatibility. Private APIs allow the flexibility to address unforeseen cases.
1111

12-
# Joining the project
12+
## Joining the project
1313

1414
Active committers and contributors are invited to introduce yourself and request commit access to this project. We have a very active Slack community that you can join [here](https://chartjs-slack.herokuapp.com/). If you think you can help, we'd love to have you!
1515

16-
# Building and Testing
16+
## Building and Testing
1717

1818
Chart.js uses <a href="https://gulpjs.com/" target="_blank">gulp</a> to build the library into a single JavaScript file.
1919

@@ -42,7 +42,7 @@ The following commands are now available from the repository root:
4242

4343
More information can be found in [gulpfile.js](https://github.com/chartjs/Chart.js/blob/master/gulpfile.js).
4444

45-
# Bugs and Issues
45+
## Bugs and Issues
4646

4747
Please report these on the GitHub page - at <a href="https://github.com/chartjs/Chart.js" target="_blank">github.com/chartjs/Chart.js</a>. Please do not use issues for support requests. For help using Chart.js, please take a look at the [`chartjs`](https://stackoverflow.com/questions/tagged/chartjs) tag on Stack Overflow.
4848

docs/getting-started/installation.md

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,65 @@
11
# Installation
2+
3+
## Package Manager
4+
25
Chart.js can be installed via npm or bower. It is recommended to get Chart.js this way.
36

4-
## npm
7+
### npm
58
[![npm](https://img.shields.io/npm/v/chart.js.svg?style=flat-square&maxAge=600)](https://npmjs.com/package/chart.js)
69
[![npm](https://img.shields.io/npm/dm/chart.js.svg?style=flat-square&maxAge=600)](https://npmjs.com/package/chart.js)
710

811
```bash
912
npm install chart.js --save
1013
```
1114

12-
## Bower
15+
### Bower
1316
[![bower](https://img.shields.io/bower/v/chartjs.svg?style=flat-square&maxAge=600)](https://libraries.io/bower/chartjs)
1417

1518
```bash
1619
bower install chart.js --save
1720
```
1821

1922
## CDN
20-
### CDNJS
23+
24+
### Selecting the Correct Build
25+
26+
Chart.js provides two different builds for you to choose: **Stand-Alone Build**, **Bundled Build**.
27+
28+
#### Stand-Alone Build
29+
Files:
30+
* `dist/Chart.js`
31+
* `dist/Chart.min.js`
32+
33+
The stand-alone build includes Chart.js as well as the color parsing library. If this version is used, you are required to include [Moment.js](https://momentjs.com/) before Chart.js for the functionality of the time axis.
34+
35+
#### Bundled Build
36+
Files:
37+
* `dist/Chart.bundle.js`
38+
* `dist/Chart.bundle.min.js`
39+
40+
The bundled build includes Moment.js in a single file. You should use this version if you require time axes and want to include a single file. You should not use this build if your application already included Moment.js. Otherwise, Moment.js will be included twice which results in increasing page load time and possible version compatibility issues. The Moment.js version in the bundled build is private to Chart.js so if you want to use Moment.js yourself, it's better to use Chart.js (non bundled) and import Moment.js manually.
41+
42+
### CDNs
43+
44+
Chart.js is available on the following CDNs
45+
46+
#### CDNJS
2147
[![cdnjs](https://img.shields.io/cdnjs/v/Chart.js.svg?style=flat-square&maxAge=600)](https://cdnjs.com/libraries/Chart.js)
2248

2349
Chart.js built files are available on [CDNJS](https://cdnjs.com/):
2450

2551
https://cdnjs.com/libraries/Chart.js
2652

27-
### jsDelivr
53+
#### jsDelivr
2854
[![jsdelivr](https://img.shields.io/npm/v/chart.js.svg?label=jsdelivr&style=flat-square&maxAge=600)](https://cdn.jsdelivr.net/npm/chart.js@latest/dist/) [![jsdelivr hits](https://data.jsdelivr.com/v1/package/npm/chart.js/badge)](https://www.jsdelivr.com/package/npm/chart.js)
2955

3056
Chart.js built files are also available through [jsDelivr](https://www.jsdelivr.com/):
3157

3258
https://www.jsdelivr.com/package/npm/chart.js?path=dist
3359

34-
## Github
60+
#### Github
3561
[![github](https://img.shields.io/github/release/chartjs/Chart.js.svg?style=flat-square&maxAge=600)](https://github.com/chartjs/Chart.js/releases/latest)
3662

3763
You can download the latest version of [Chart.js on GitHub](https://github.com/chartjs/Chart.js/releases/latest).
3864

3965
If you download or clone the repository, you must [build](../developers/contributing.md#building-and-testing) Chart.js to generate the dist files. Chart.js no longer comes with prebuilt release versions, so an alternative option to downloading the repo is **strongly** advised.
40-
41-
# Selecting the Correct Build
42-
43-
Chart.js provides two different builds for you to choose: **Stand-Alone Build**, **Bundled Build**.
44-
45-
## Stand-Alone Build
46-
Files:
47-
* `dist/Chart.js`
48-
* `dist/Chart.min.js`
49-
50-
The stand-alone build includes Chart.js as well as the color parsing library. If this version is used, you are required to include [Moment.js](https://momentjs.com/) before Chart.js for the functionality of the time axis.
51-
52-
## Bundled Build
53-
Files:
54-
* `dist/Chart.bundle.js`
55-
* `dist/Chart.bundle.min.js`
56-
57-
The bundled build includes Moment.js in a single file. You should use this version if you require time axes and want to include a single file. You should not use this build if your application already included Moment.js. Otherwise, Moment.js will be included twice which results in increasing page load time and possible version compatibility issues. The Moment.js version in the bundled build is private to Chart.js so if you want to use Moment.js yourself, it's better to use Chart.js (non bundled) and import Moment.js manually.

0 commit comments

Comments
 (0)