Skip to content

Commit 57a29b5

Browse files
authored
Update ChartControl.md
1 parent 6bfa708 commit 57a29b5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/documentation/docs/controls/ChartControl.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ Here is an example of the control in action:
1414
- Import the following module to your component:
1515

1616
```TypeScript
17-
import { ChartControl } from "@pnp/spfx-controls-react/lib/ChartControl";
17+
import { ChartControl, ChartType } from '@pnp/spfx-controls-react/lib/ChartControl';
1818
```
1919

2020
- Use the `ChartControl` control in your code as follows:
2121

2222
```TypeScript
23-
<ChartControl type='bar'
23+
<ChartControl
24+
type={ChartType.Bar}
2425
data={{
2526
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
2627
datasets: [{
@@ -84,7 +85,8 @@ var myChart = new Chart(ctx, {
8485
You would use the following Typescript code:
8586

8687
```TypeScript
87-
<ChartControl type={ChartType.Bar}
88+
<ChartControl
89+
type={ChartType.Bar}
8890
data={{
8991
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
9092
datasets: [{

0 commit comments

Comments
 (0)