2018-12-22 11:46:10 +00:00
|
|
|
`ReportSummary` (component)
|
|
|
|
===========================
|
|
|
|
|
|
|
|
Component to render summary numbers in reports.
|
|
|
|
|
|
|
|
Props
|
|
|
|
-----
|
|
|
|
|
|
|
|
### `charts`
|
|
|
|
|
|
|
|
- **Required**
|
|
|
|
- Type: Array
|
|
|
|
- Default: null
|
|
|
|
|
|
|
|
Properties of all the charts available for that report.
|
|
|
|
|
|
|
|
### `endpoint`
|
|
|
|
|
|
|
|
- **Required**
|
|
|
|
- Type: String
|
|
|
|
- Default: null
|
|
|
|
|
2018-12-28 19:42:20 +00:00
|
|
|
The endpoint to use in API calls to populate the Summary Numbers.
|
|
|
|
For example, if `taxes` is provided, data will be fetched from the report
|
2019-01-18 02:52:58 +00:00
|
|
|
`taxes` endpoint (ie: `/wc/v4/reports/taxes/stats`). If the provided endpoint
|
2018-12-28 19:42:20 +00:00
|
|
|
doesn't exist, an error will be shown to the user with `ReportError`.
|
2018-12-22 11:46:10 +00:00
|
|
|
|
|
|
|
### `query`
|
|
|
|
|
|
|
|
- **Required**
|
|
|
|
- Type: Object
|
|
|
|
- Default: null
|
|
|
|
|
|
|
|
The query string represented in object form.
|
|
|
|
|
|
|
|
### `selectedChart`
|
|
|
|
|
|
|
|
- **Required**
|
|
|
|
- Type: Object
|
|
|
|
- key: String - Key of the selected chart.
|
|
|
|
- Default: null
|
|
|
|
|
|
|
|
Properties of the selected chart.
|
|
|
|
|
2019-02-14 17:24:02 +00:00
|
|
|
### `summaryData`
|
|
|
|
|
|
|
|
- Type: Object
|
|
|
|
- Default: `{
|
|
|
|
totals: {
|
|
|
|
primary: {},
|
|
|
|
secondary: {},
|
|
|
|
},
|
|
|
|
isError: false,
|
|
|
|
isRequesting: false,
|
|
|
|
}`
|
|
|
|
|
|
|
|
Data to display in the SummaryNumbers.
|
|
|
|
|