Skip to content

Commit

Permalink
docs: Issue-241 - update README to include .update() functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
deezone committed Nov 24, 2019
1 parent 11a6455 commit a7cdb9f
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,13 @@ customSectors: {
color : "#43bf58",
lo : 0,
hi : 50
},{
},
{
color : "#ff3b30",
lo : 51,
hi : 100
}]
}
```

### Pointer options
Expand All @@ -181,18 +183,42 @@ pointerOptions: {

Used to refresh Gauge value and max value

`refresh(val, max, min, label)`
`guage.refresh(val, max, min, label)`

- `val` : The Gauge value (required)
- `max` : The Gauge Max value (optional)
- `min` : The Gauge Min value (optional)
- `label` : The Gauge label text (optional)

### Update

Used to dynamically update existing Gauge appearence

`gauge.update(option, value)`

vs

```js
const options = {
valueFontColor: '#ff0000',
labelFontColor: '#ff0000',
}
gauge.update(options)
```

#### Options

| Name | Description |
| -------------------- | ------------------------------------------- |
| valueFontColor | HEX color for gauge value text |
| labelFontColor | HEX color for gauge min, max and label text |


### Destroy

Used to destroy the Gauge element

`destroy()`
`guage.destroy()`

## Demo

Expand Down

0 comments on commit a7cdb9f

Please sign in to comment.