Skip to content

Commit 4c200b2

Browse files
authored
Replace html extension with md extension for docs (#11439)
* Replace html extension with md extension for docs * Revert some links * Commit saved files
1 parent 132324f commit 4c200b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+291
-291
lines changed

docs/axes/labelling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The call to the method is scoped to the scale. `this` inside the method is the s
3131
If the callback returns `null` or `undefined` the associated grid line will be hidden.
3232

3333
:::tip
34-
The [category axis](../axes/cartesian/category), which is the default x-axis for line and bar charts, uses the `index` as internal data format. For accessing the label, use `this.getLabelForValue(value)`. [API: getLabelForValue](../api/classes/Scale.html#getlabelforvalue)
34+
The [category axis](../axes/cartesian/category), which is the default x-axis for line and bar charts, uses the `index` as internal data format. For accessing the label, use `this.getLabelForValue(value)`. [API: getLabelForValue](../api/classes/Scale.md#getlabelforvalue)
3535
:::
3636

3737
In the following example, every label of the Y-axis would be displayed with a dollar sign at the front.

docs/developers/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Latest builds are available for testing at:
1818

1919
:::warning Warning
2020

21-
Development builds **must not** be used for production purposes or as replacement for a CDN. See [available CDNs](../getting-started/installation.html#cdn).
21+
Development builds **must not** be used for production purposes or as replacement for a CDN. See [available CDNs](../getting-started/installation.md#cdn).
2222

2323
:::
2424

docs/general/colors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Charts support three color options:
44
* for geometric elements, you can change *background* and *border* colors;
55
* for textual elements, you can change the *font* color.
66

7-
Also, you can change the whole [canvas background](../configuration/canvas-background.html).
7+
Also, you can change the whole [canvas background](../configuration/canvas-background.md).
88

99
## Default colors
1010

docs/getting-started/usage.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Run `npm install`, `yarn install`, or `pnpm install` to install the dependencies
4949
</html>
5050
```
5151

52-
As you can see, Chart.js requires minimal markup: a `canvas` tag with an `id` by which we’ll reference the chart later. By default, Chart.js charts are [responsive](../configuration/responsive.html) and take the whole enclosing container. So, we set the width of the `div` to control chart width.
52+
As you can see, Chart.js requires minimal markup: a `canvas` tag with an `id` by which we’ll reference the chart later. By default, Chart.js charts are [responsive](../configuration/responsive.md) and take the whole enclosing container. So, we set the width of the `div` to control chart width.
5353

5454
Lastly, let’s create the `src/acquisitions.js` file with the following contents:
5555

@@ -96,7 +96,7 @@ Time to run the example with `npm run dev`, `yarn dev`, or `pnpm dev` and naviga
9696

9797
![result](./usage-1.png)
9898

99-
With just a few lines of code, we’ve got a chart with a lot of features: a [legend](../configuration/legend.html), [grid lines](../samples/scale-options/grid.html), [ticks](../samples/scale-options/ticks.html), and [tooltips](../configuration/tooltip.html) shown on hover. Refresh the web page a few times to see that the chart is also [animated](../configuration/animations.html#animations). Try clicking on the “Acquisitions by year” label to see that you’re also able to toggle datasets visibility (especially useful when you have multiple datasets).
99+
With just a few lines of code, we’ve got a chart with a lot of features: a [legend](../configuration/legend.md), [grid lines](../samples/scale-options/grid.md), [ticks](../samples/scale-options/ticks.md), and [tooltips](../configuration/tooltip.md) shown on hover. Refresh the web page a few times to see that the chart is also [animated](../configuration/animations.md#animations). Try clicking on the “Acquisitions by year” label to see that you’re also able to toggle datasets visibility (especially useful when you have multiple datasets).
100100

101101
### Simple customizations
102102

@@ -133,7 +133,7 @@ Replace the `new Chart(...);` invocation in `src/acquisitions.js` with the follo
133133
);
134134
```
135135

136-
As you can see, we’ve added the `options` property to the second argument—that’s how you can specify all kinds of customization options for Chart.js. The [animation is disabled](../configuration/animations.html#disabling-animation) with a boolean flag provided via `animation`. Most chart-wide options (e.g., [responsiveness](../configuration/responsive.html) or [device pixel ratio](../configuration/device-pixel-ratio.html)) are configured like this.
136+
As you can see, we’ve added the `options` property to the second argument—that’s how you can specify all kinds of customization options for Chart.js. The [animation is disabled](../configuration/animations.md#disabling-animation) with a boolean flag provided via `animation`. Most chart-wide options (e.g., [responsiveness](../configuration/responsive.md) or [device pixel ratio](../configuration/device-pixel-ratio.md)) are configured like this.
137137

138138
The legend and tooltips are hidden with boolean flags provided under the respective sections in `plugins`. Note that some of Chart.js features are extracted into plugins: self-contained, separate pieces of code. A few of them are available as a part of [Chart.js distribution](https://github.com/chartjs/Chart.js/tree/master/src/plugins), other plugins are maintained independently and can be located in the [awesome list](https://github.com/chartjs/awesome) of plugins, framework integrations, and additional chart types.
139139

@@ -252,7 +252,7 @@ We’re done with the bar chart. Let’s try another Chart.js chart type.
252252

253253
Chart.js supports many common chart types.
254254

255-
For instance, [Bubble chart](../charts/bubble.html) allows to display three dimensions of data at the same time: locations on `x` and `y` axes represent two dimensions, and the third dimension is represented by the size of the individual bubbles.
255+
For instance, [Bubble chart](../charts/bubble.md) allows to display three dimensions of data at the same time: locations on `x` and `y` axes represent two dimensions, and the third dimension is represented by the size of the individual bubbles.
256256

257257
To create the chart, stop the already running application, then go to `src/index.html`, and uncomment the following two lines:
258258

@@ -301,7 +301,7 @@ Now, reset caches with `rm -rf .parcel-cache` and start the application again wi
301301

302302
Well, it doesn’t look pretty.
303303

304-
First of all, the chart is not square. Artworks’ width and height are equally important so we’d like to make the chart width equal to its height as well. By default, Chart.js charts have the [aspect ratio](../configuration/responsive.html) of either 1 (for all radial charts, e.g., a doughnut chart) or 2 (for all the rest). Let’s modify the aspect ratio for our chart:
304+
First of all, the chart is not square. Artworks’ width and height are equally important so we’d like to make the chart width equal to its height as well. By default, Chart.js charts have the [aspect ratio](../configuration/responsive.md) of either 1 (for all radial charts, e.g., a doughnut chart) or 2 (for all the rest). Let’s modify the aspect ratio for our chart:
305305

306306
```jsx
307307
// ...
@@ -349,7 +349,7 @@ Great! Behold the updated chart:
349349
350350
![result](./usage-5.png)
351351
352-
However, there’s one more nitpick: what are these numbers? It’s not very obvious that the units are centimetres. Let’s apply a [custom tick format](../axes/labelling.html#creating-custom-tick-formats) to both axes to make things clear. We’ll provide a callback function that would be called to format each tick value. Here’s the updated axes configuration:
352+
However, there’s one more nitpick: what are these numbers? It’s not very obvious that the units are centimetres. Let’s apply a [custom tick format](../axes/labelling.md#creating-custom-tick-formats) to both axes to make things clear. We’ll provide a callback function that would be called to format each tick value. Here’s the updated axes configuration:
353353
354354
```jsx
355355
// ...
@@ -434,13 +434,13 @@ As you can see, we define three datasets with different labels. Each dataset get
434434
435435
![result](./usage-7.png)
436436
437-
Here we rely on the default color palette. However, keep in mind every chart type supports a lot of [dataset options](../charts/bubble.html#dataset-properties) that you can feel free to customize.
437+
Here we rely on the default color palette. However, keep in mind every chart type supports a lot of [dataset options](../charts/bubble.md#dataset-properties) that you can feel free to customize.
438438
439439
### Plugins
440440
441-
Another—and very powerful!—way to customize Chart.js charts is to use plugins. You can find some in the [plugin directory](https://github.com/chartjs/awesome#plugins) or create your own, ad-hoc ones. In Chart.js ecosystem, it’s idiomatic and expected to fine tune charts with plugins. For example, you can customize [canvas background](../configuration/canvas-background.html) or [add a border](../samples/plugins/chart-area-border.html) to it with simple ad-hoc plugins. Let’s try the latter.
441+
Another—and very powerful!—way to customize Chart.js charts is to use plugins. You can find some in the [plugin directory](https://github.com/chartjs/awesome#plugins) or create your own, ad-hoc ones. In Chart.js ecosystem, it’s idiomatic and expected to fine tune charts with plugins. For example, you can customize [canvas background](../configuration/canvas-background.md) or [add a border](../samples/plugins/chart-area-border.md) to it with simple ad-hoc plugins. Let’s try the latter.
442442
443-
Plugins have an [extensive API](../developers/plugins.html) but, in a nutshell, a plugin is defined as an object with a `name` and one or more callback functions defined in the extension points. Insert the following snippet before and in place of the `new Chart(...);` invocation in `src/dimensions.js`:
443+
Plugins have an [extensive API](../developers/plugins.md) but, in a nutshell, a plugin is defined as an object with a `name` and one or more callback functions defined in the extension points. Insert the following snippet before and in place of the `new Chart(...);` invocation in `src/dimensions.js`:
444444
445445
```jsx
446446
// ...
@@ -556,7 +556,7 @@ Chart.register(
556556
);
557557
```
558558
559-
You can see that, in addition to the `Chart` class, we’re also loading a controller for the chart type, scales, and other chart elements (e.g., bars or points). You can look all available components up in the [documentation](./integration.html#bundle-optimization).
559+
You can see that, in addition to the `Chart` class, we’re also loading a controller for the chart type, scales, and other chart elements (e.g., bars or points). You can look all available components up in the [documentation](./integration.md#bundle-optimization).
560560
561561
Alternatively, you can follow Chart.js advice in the console. For example, if you forget to import `BarController` for your bar chart, you’ll see the following message in the browser console:
562562
@@ -586,6 +586,6 @@ By importing and registering only select components, we’ve removed more than 5
586586
587587
Now you’re familiar with all major concepts of Chart.js: chart types and elements, datasets, customization, plugins, components, and tree-shaking.
588588
589-
Feel free to review many [examples of charts](../samples/information.html) in the documentation and check the [awesome list](https://github.com/chartjs/awesome) of Chart.js plugins and additional chart types as well as [framework integrations](https://github.com/chartjs/awesome#integrations) (e.g., React, Vue, Svelte, etc.). Also, don’t hesitate to join [Chart.js Discord](https://discord.gg/HxEguTK6av) and follow [Chart.js on Twitter](https://twitter.com/chartjs).
589+
Feel free to review many [examples of charts](../samples/information.md) in the documentation and check the [awesome list](https://github.com/chartjs/awesome) of Chart.js plugins and additional chart types as well as [framework integrations](https://github.com/chartjs/awesome#integrations) (e.g., React, Vue, Svelte, etc.). Also, don’t hesitate to join [Chart.js Discord](https://discord.gg/HxEguTK6av) and follow [Chart.js on Twitter](https://twitter.com/chartjs).
590590
591591
Have fun and good luck building with Chart.js!

docs/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
Welcome to Chart.js!
44

55
* **[Get started with Chart.js](./getting-started/) — best if you're new to Chart.js**
6-
* Migrate from [Chart.js v3](./migration/v4-migration.html) or [Chart.js v2](./migration/v3-migration.html)
6+
* Migrate from [Chart.js v3](./migration/v4-migration.md) or [Chart.js v2](./migration/v3-migration.md)
77
* Join the community on [Discord](https://discord.gg/HxEguTK6av) and [Twitter](https://twitter.com/chartjs)
88
* Post a question tagged with `chart.js` on [Stack Overflow](https://stackoverflow.com/questions/tagged/chart.js)
9-
* [Contribute to Chart.js](./developers/contributing.html)
9+
* [Contribute to Chart.js](./developers/contributing.md)
1010

1111
## Why Chart.js
1212

@@ -16,7 +16,7 @@ Chart.js was created and [announced](https://twitter.com/_nnnick/status/31359920
1616

1717
### Features
1818

19-
Chart.js provides a set of frequently used chart types, plugins, and customization options. In addition to a reasonable set of [built-in chart types](./charts/area.html), you can use additional community-maintained [chart types](https://github.com/chartjs/awesome#charts). On top of that, it’s possible to combine several chart types into a [mixed chart](./charts/mixed.html) (essentially, blending multiple chart types into one on the same canvas).
19+
Chart.js provides a set of frequently used chart types, plugins, and customization options. In addition to a reasonable set of [built-in chart types](./charts/area.md), you can use additional community-maintained [chart types](https://github.com/chartjs/awesome#charts). On top of that, it’s possible to combine several chart types into a [mixed chart](./charts/mixed.md) (essentially, blending multiple chart types into one on the same canvas).
2020

2121
Chart.js is highly customizable with [custom plugins](https://github.com/chartjs/awesome#plugins) to create annotations, zoom, or drag-and-drop functionalities to name a few things.
2222

@@ -30,15 +30,15 @@ Chart.js comes with built-in TypeScript typings and is compatible with all popul
3030

3131
### Developer experience
3232

33-
Chart.js has very thorough documentation (yes, you're reading it), [API reference](./api/), and [examples](./samples/information.html). Maintainers and community members eagerly engage in conversations on [Discord](https://discord.gg/HxEguTK6av), [GitHub Discussions](https://github.com/chartjs/Chart.js/discussions), and [Stack Overflow](https://stackoverflow.com/questions/tagged/chart.js) where more than 11,000 questions are tagged with `chart.js`.
33+
Chart.js has very thorough documentation (yes, you're reading it), [API reference](./api/), and [examples](./samples/information.md). Maintainers and community members eagerly engage in conversations on [Discord](https://discord.gg/HxEguTK6av), [GitHub Discussions](https://github.com/chartjs/Chart.js/discussions), and [Stack Overflow](https://stackoverflow.com/questions/tagged/chart.js) where more than 11,000 questions are tagged with `chart.js`.
3434

3535
### Canvas rendering
3636

3737
Chart.js renders chart elements on an HTML5 canvas unlike several others, mostly D3.js-based, charting libraries that render as SVG. Canvas rendering makes Chart.js very performant, especially for large datasets and complex visualizations that would otherwise require thousands of SVG nodes in the DOM tree. At the same time, canvas rendering disallows CSS styling, so you will have to use built-in options for that, or create a custom plugin or chart type to render everything to your liking.
3838

3939
### Performance
4040

41-
Chart.js is very well suited for large datasets. Such datasets can be efficiently ingested using the internal format, so you can skip data [parsing](./general/performance.html#parsing) and [normalization](./general/performance.html#data-normalization). Alternatively, [data decimation](./configuration/decimation.html) can be configured to sample the dataset and reduce its size before rendering.
41+
Chart.js is very well suited for large datasets. Such datasets can be efficiently ingested using the internal format, so you can skip data [parsing](./general/performance.md#parsing) and [normalization](./general/performance.md#data-normalization). Alternatively, [data decimation](./configuration/decimation.md) can be configured to sample the dataset and reduce its size before rendering.
4242

4343
In the end, the canvas rendering that Chart.js uses reduces the toll on your DOM tree in comparison to SVG rendering. Also, tree-shaking support allows you to include minimal parts of Chart.js code in your bundle, reducing bundle size and page load time.
4444

docs/samples/advanced/data-decimation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ module.exports = {
112112
};
113113
```
114114
## Docs
115-
* [Data Decimation](../../configuration/decimation.html)
116-
* [Line](../../charts/line.html)
117-
* [Time Scale](../../axes/cartesian/time.html)
115+
* [Data Decimation](../../configuration/decimation.md)
116+
* [Line](../../charts/line.md)
117+
* [Time Scale](../../axes/cartesian/time.md)
118118

docs/samples/advanced/derived-axis-type.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ module.exports = {
5050
<<< @/scripts/log2.js
5151

5252
## Docs
53-
* [Data structures (`labels`)](../../general/data-structures.html)
54-
* [Line](../../charts/line.html)
55-
* [New Axes](../../developers/axes.html)
53+
* [Data structures (`labels`)](../../general/data-structures.md)
54+
* [Line](../../charts/line.md)
55+
* [New Axes](../../developers/axes.md)

docs/samples/advanced/derived-chart-type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ module.exports = {
4646
<<< @/scripts/derived-bubble.js
4747

4848
## Docs
49-
* [Bubble Chart](../../charts/bubble.html)
50-
* [New Charts](../../developers/charts.html)
49+
* [Bubble Chart](../../charts/bubble.md)
50+
* [New Charts](../../developers/charts.md)

docs/samples/advanced/linear-gradient.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ module.exports = {
110110
```
111111

112112
## Docs
113-
* [Colors](../../general/colors.html)
114-
* [Patterns and Gradients](../../general/colors.html#patterns-and-gradients)
115-
* [Data structures (`labels`)](../../general/data-structures.html)
116-
* [Options](../../general/options.html)
117-
* [Scriptable Options](../../general/options.html#scriptable-options)
118-
* [Line](../../charts/line.html)
113+
* [Colors](../../general/colors.md)
114+
* [Patterns and Gradients](../../general/colors.md#patterns-and-gradients)
115+
* [Data structures (`labels`)](../../general/data-structures.md)
116+
* [Options](../../general/options.md)
117+
* [Scriptable Options](../../general/options.md#scriptable-options)
118+
* [Line](../../charts/line.md)

docs/samples/advanced/programmatic-events.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ module.exports = {
105105
## API
106106
* [Chart](../../api/classes/Chart.md)
107107
* [`setActiveElements`](../../api/classes/Chart.md#setactiveelements)
108-
* [TooltipModel](../../api/interfaces/TooltipModel.html)
109-
* [`setActiveElements`](../../api/interfaces/TooltipModel.html#setactiveelements)
108+
* [TooltipModel](../../api/interfaces/TooltipModel.md)
109+
* [`setActiveElements`](../../api/interfaces/TooltipModel.md#setactiveelements)
110110

111111
## Docs
112-
* [Bar](../../charts/bar.html)
113-
* [Interactions (`hoverBorderColor`)](../../charts/bar.html#interactions)
114-
* [Interactions](../../configuration/interactions.html)
115-
* [Tooltip](../../configuration/tooltip.html)
112+
* [Bar](../../charts/bar.md)
113+
* [Interactions (`hoverBorderColor`)](../../charts/bar.md#interactions)
114+
* [Interactions](../../configuration/interactions.md)
115+
* [Tooltip](../../configuration/tooltip.md)

docs/samples/advanced/progress-bar.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ module.exports = {
144144
```
145145

146146
## Docs
147-
* [Animations](../../configuration/animations.html)
148-
* [Animation Callbacks](../../configuration/animations.html#animation-callbacks)
149-
* [Data structures (`labels`)](../../general/data-structures.html)
150-
* [Line](../../charts/line.html)
151-
* [Options](../../general/options.html)
152-
* [Scriptable Options](../../general/options.html#scriptable-options)
147+
* [Animations](../../configuration/animations.md)
148+
* [Animation Callbacks](../../configuration/animations.md#animation-callbacks)
149+
* [Data structures (`labels`)](../../general/data-structures.md)
150+
* [Line](../../charts/line.md)
151+
* [Options](../../general/options.md)
152+
* [Scriptable Options](../../general/options.md#scriptable-options)

docs/samples/advanced/radial-gradient.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,5 @@ module.exports = {
118118
## Docs
119119
* [Polar Area Chart](../../charts/polar.md)
120120
* [Styling](../../charts/polar.md#styling)
121-
* [Options](../../general/options.html)
122-
* [Scriptable Options](../../general/options.html#scriptable-options)
121+
* [Options](../../general/options.md)
122+
* [Scriptable Options](../../general/options.md#scriptable-options)

0 commit comments

Comments
 (0)