Skip to content

Commit 7cf4672

Browse files
committed
docs: describe the FAQ pages
Docusaurus took the description of a page from its first paragraph, Starlight uses the one of the website: each FAQ page has its own description for search results again.
1 parent de6df3d commit 7cf4672

8 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎website/src/content/docs/faq/canvas-context.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "How to access the canvas context?"
3+
description: "Get the canvas node of a react-chartjs-2 chart and its 2D context through a ref to the Chart.js instance."
34
---
45

56
The canvas node and hence context can be accessed by placing a ref to the element as:

‎website/src/content/docs/faq/chartjs-instance.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "How to access the Chart.js instance?"
3+
description: "Get the Chart.js instance behind a react-chartjs-2 component with a ref, to call Chart.js methods on it."
34
---
45

56
The Chart.js instance can be accessed by placing a ref to the element as:

‎website/src/content/docs/faq/fill-property.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "Why is a background fill not working?"
3+
description: "Fix a background fill that does not show in a react-chartjs-2 chart: register the Filler plugin of Chart.js."
34
---
45

56
As you can see in [migration to v4 guide](/docs/migration-to-v4#tree-shaking):

‎website/src/content/docs/faq/maintain-aspect-ratio.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "Why doesn't the chart maintain its width/height?"
3+
description: "Make a react-chartjs-2 chart keep a custom width and height by setting the maintainAspectRatio option to false."
34
---
45

56
In order for Chart.js to obey the custom size you need to set `maintainAspectRatio` to `false`:

‎website/src/content/docs/faq/registered-element.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "How to fix \"... is not a registered element\" error?"
3+
description: "Fix the \"... is not a registered element\" error of Chart.js: register the elements your chart uses, such as ArcElement."
34
---
45

56
As you can see in [migration to v4 guide](/docs/migration-to-v4#tree-shaking):

‎website/src/content/docs/faq/registered-scale.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "How to fix \"... is not a registered scale\" error?"
3+
description: "Fix the \"... is not a registered scale\" error of Chart.js: register the scales your chart uses, such as CategoryScale."
34
---
45

56
As you can see in [migration to v4 guide](/docs/migration-to-v4#tree-shaking):

‎website/src/content/docs/faq/typescript.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "How to use react-chartjs-2 with TypeScript?"
3+
description: "Type the data and options of react-chartjs-2 charts with ChartData, ChartOptions and other types of Chart.js."
34
---
45

56
TypeScript has extremely robust type inference capabilities and most of the time

‎website/src/content/docs/faq/why-two.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "Why does react-chartjs-2 have \"2\" in its name?"
3+
description: "react-chartjs-2 started in 2016 as a React wrapper for Chart.js v2. It supports Chart.js v4 now, and the name stayed."
34
---
45

56
Initially, this library was [created in 2016](https://github.com/reactchartjs/react-chartjs-2/commit/d8cbcb7dc050d749771c6bb1347e22ec63bdddf9#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R3) as a wrapper for Chart.js v2.

0 commit comments

Comments
 (0)