Skip to content

Commit 210486b

Browse files
authored
Update ChartControl.md
1 parent 57a29b5 commit 210486b

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

docs/documentation/docs/controls/ChartControl.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ See [below](#charttype) for more information on what types of data are required
142142

143143
The ChartControl makes it easy to retrieve data asynchronously with the `datapromise` property.
144144

145-
To use it `datapromise`, add a function to your web part that returns a `Promise<Chart.ChartData>` as follows:
145+
To use `datapromise`, add a function to your web part that returns a `Promise<Chart.ChartData>` as follows:
146146

147147
```TypeScript
148148
private _loadAsyncData(): Promise<Chart.ChartData> {
@@ -191,7 +191,7 @@ If you want, you provide a template to display until the `datapromise` is resolv
191191

192192
![Data Promise with Loading Template](../assets/ChartControlDataPromise.gif)
193193

194-
You can provide full React controls within the `loadingtemplate`. For example, to use the Office Fabric UI `Spinner` control, you would use the following codE:
194+
You can provide full React controls within the `loadingtemplate`. For example, to use the Office UI Fabric `Spinner` control, you would use the following code:
195195

196196
```TypeScript
197197
import { Spinner, SpinnerSize } from 'office-ui-fabric-react/lib/Spinner';
@@ -296,7 +296,7 @@ For example:
296296

297297
### ChartControl Properties
298298

299-
The ChartControl control can be configured with the following properties:
299+
The ChartControl can be configured with the following properties:
300300

301301
| Property | Type | Required | Description |
302302
| ---- | ---- | ---- | ---- |
@@ -330,6 +330,22 @@ You can call the following methods to interact with the chart after it has been
330330
| toBase64Image | () => string | Returns a base 64 encoded string of the chart in it's current state. |
331331
| update | (config?: number \| boolean \| string) => void | Triggers an update of the chart. This can be safely called after updating the data object. This will update all scales, legends, and then re-render the chart. |
332332

333+
### ChartType
334+
335+
Defines the type of chart that will be rendered. For more information what data structure is required for each type of chart, review the Chart.js documentation ( links below ).
336+
337+
| Name | Chart.js Equivalent | Description |
338+
| ---- | ---- | ---- |
339+
| [Bar](./BarChart.md) | [bar](https://www.chartjs.org/docs/latest/charts/bar.html) | Vertical bar chart |
340+
| [Bubble](./BubbleChart.md) | [bubble](https://www.chartjs.org/docs/latest/charts/bubble.html) | Bubble chart |
341+
| [Doughnut](./DoughnutChart.md) | [doughnut](https://www.chartjs.org/docs/latest/charts/doughnut.html) | Doughnut chart |
342+
| [HorizontalBar](./BarChart.md#horizontalbarchart) | [horizontalBar](https://www.chartjs.org/docs/latest/charts/bar.html#horizontal-bar-chart) | Horizontal bar chart |
343+
| [Line](./LineChart.md) | [line](https://www.chartjs.org/docs/latest/charts/line.html) | Line chart |
344+
| [Pie](./PieChart.md) | [pie](https://www.chartjs.org/docs/latest/charts/doughnut.html) | Pie chart |
345+
| [PolarArea](./PolarAreaChart.md) | [polarArea](https://www.chartjs.org/docs/latest/charts/polar.html) | Polar area chart |
346+
| [Radar](./RadarChart.md) | [radar](https://www.chartjs.org/docs/latest/charts/radar.html) | Radar chart |
347+
| [Scatter](./ScatterChart.md) | [scatter](https://www.chartjs.org/docs/latest/charts/scatter.html) | Scatter graph |
348+
333349
### IChartAccessibility
334350

335351
The `IChartAccessibility` interface implements the following properties:
@@ -367,22 +383,6 @@ Defines one of the possible Office color palette to use in a chart. The color pa
367383
| OfficeMonochromatic12 | Monochromatic Palette 12 | Blue gradient, light to dark | ![Office Monochromatic 12](../assets/OfficeMono12.png) |
368384
| OfficeMonochromatic13 | Monochromatic Palette 13 | Green gradient, light to dark | ![Office Monochromatic 13](../assets/OfficeMono13.png) |
369385

370-
### ChartType
371-
372-
Defines the type of chart that will be rendered. For more information what data structure is required for each type of chart, review the Chart.js documentation ( links below ).
373-
374-
| Name | Chart.js Equivalent | Description |
375-
| ---- | ---- | ---- |
376-
| [Bar](./BarChart.md) | [bar](https://www.chartjs.org/docs/latest/charts/bar.html) | Vertical bar chart |
377-
| [Bubble](./BubbleChart.md) | [bubble](https://www.chartjs.org/docs/latest/charts/bubble.html) | Bubble chart |
378-
| [Doughnut](./DoughnutChart.md) | [doughnut](https://www.chartjs.org/docs/latest/charts/doughnut.html) | Doughnut chart |
379-
| [HorizontalBar](./BarChart.md#horizontalbarchart) | [horizontalBar](https://www.chartjs.org/docs/latest/charts/bar.html#horizontal-bar-chart) | Horizontal bar chart |
380-
| [Line](./LineChart.md) | [line](https://www.chartjs.org/docs/latest/charts/line.html) | Line chart |
381-
| [Pie](./PieChart.md) | [pie](https://www.chartjs.org/docs/latest/charts/doughnut.html) | Pie chart |
382-
| [PolarArea](./PolarAreaChart.md) | [polarArea](https://www.chartjs.org/docs/latest/charts/polar.html) | Polar area chart |
383-
| [Radar](./RadarChart.md) | [radar](https://www.chartjs.org/docs/latest/charts/radar.html) | Radar chart |
384-
| [Scatter](./ScatterChart.md) | [scatter](https://www.chartjs.org/docs/latest/charts/scatter.html) | Scatter graph |
385-
386386
### IChartPlugin
387387

388388
The easiest way to customize a chart is to use the [plugin functionality](https://www.chartjs.org/docs/latest/notes/extensions.html) provided by [Chart.js](https://www.chartjs.org/). In order to use a plugin, simply pass an array of objects that implement the `IChartPlugin` interface to the `plugins` property of the ChartControl.

0 commit comments

Comments
 (0)