Skip to content

Commit

Permalink
Update API-doc for FHI Angular Highcharts (units) (#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
proand authored Jun 19, 2024
1 parent 7347220 commit 2f4e403
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions projects/fhi-angular-highcharts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ This is where `allowedCommonJsDependencies` i located in `angular.json`
| `data` | `FhiDiagramSerieData[]` | - | yes | The individual data points in a serie. See [FhiDiagramSerieData](#interface-fhidiagramseriedata) for details. |
| `name` | `string \| string[]` | - | yes | The name of the serie as shown in the legend. **NB!** The type `string` is an formatted string; pipe (`\|`) is beeing used as seperator between category names if more than one category name is concatenated to one single serie name. To avoid dependency on a given separator, use an array of category names instead. NB! `series` can not contain duplicate `serie.name` |
| `stack` | `string` | - | yes | This option allows for grouping series in a stacked chart. Only applies to diagramTypeId `barStacked` and `columnStacked`. |
| `unitId` | `number \| string` | - | no | Used to associate the serie with a unit. This only works if `unit.id` ([FhiDiagramUnit](#interface-fhidiagramunit)) is set, and value is equal to `serie.unitId`. |
### Interface FhiDiagramSerieData
Expand All @@ -203,12 +204,14 @@ FhiDiagramSerieData is a custum type for FHI Angular Highcharts, but it is based
### Interface FhiDiagramUnit
| Property | Type | Default | Required | Description |
| ---------- | -------- | ------- | -------- | ----------- |
| `decimals` | `number` | - | no | The decimal count. If not set the decimal count same as in data. Count is **limited to 14** decimals due to loss of precision at runtime above 14. A warning will be given in the consol if more than 14 decimals. |
| `label` | `string` | - | yes | The vertical y-axis label, showing next to the axis line. |
| `symbol` | `string` | - | no | Symbol before or after the value in both tooltip and y-axis. |
| `position` | `string` | - | no | Wether the symbol i placed before or after the numbers in the diagram. Possible values: `'start' \| 'end'` |
| Property | Type | Default | Required | Description |
| ---------- | ------------------ | ------- | -------- | ----------- |
| `id` | `number \| string` | - | no | Used to associate the unit with a serie. This only works if a `serie.unitId` ([FhiDiagramSerie](#interface-fhidiagramserie)) is set, and value is equal to `unit.id`. |
| `decimals` | `number` | - | no | The decimal count. If not set the decimal count same as in data. Count is **limited to 14** decimals due to loss of precision at runtime above 14. A warning will be given in the consol if more than 14 decimals. |
| `label` | `string` | - | yes | The vertical y-axis label, showing next to the axis line. |
| `symbol` | `string` | - | no | Symbol before or after the value in both tooltip and y-axis. |
| `position` | `string` | - | no | Wether the symbol i placed before or after the numbers in the diagram. Possible values: `'start' \| 'end'` |
| `yAxis` | `number` | - | no | Which y-axis to associate the unit with. Only support for two y-axis is implemented: `0` is left hand y-axis, `1` is right hand y-axis. |
## Changelog
Expand Down

0 comments on commit 2f4e403

Please sign in to comment.