Updated README
This commit is contained in:
36
README.md
36
README.md
@@ -118,17 +118,45 @@ The parent component renders the charts as follows
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Charts API
|
## Charts API
|
||||||
|
|
||||||
### Testing
|
#### LivewireLineChart
|
||||||
|
|
||||||
|
| Method | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| setTitle(string $title) | Sets chart title |
|
||||||
|
| setAnimated(boolean $animated) | Enables/disables animation |
|
||||||
|
| addPoint(string $title, double $value, array $extras = []) | Adds a point to the line chart. `$extras` is forwarded on click event |
|
||||||
|
| addMarker(string $title, double $value) | Adds a marker point to the line chart. Markers are used to emphasize particular points in the chart |
|
||||||
|
| withOnPointClickEvent(string $eventName) | Event Name that will be fired when a point/marker of the chart is clicked |
|
||||||
|
|
||||||
|
#### LivewireColumnChart
|
||||||
|
|
||||||
|
| Method | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| setTitle(string $title) | Sets chart title |
|
||||||
|
| setAnimated(boolean $animated) | Enables/disables animation |
|
||||||
|
| setOpacity(int $opacity) | Sets columns' opacity |
|
||||||
|
| addColumn(string $title, double $value, string $color, array $extras = []) | Adds a column to the chart with the specified color. `$extras` is forwarded on click event |
|
||||||
|
| onColumnClickEventName(string $eventName) | Event Name that will be fired when a column of the chart is clicked |
|
||||||
|
|
||||||
|
#### LivewirePieChart
|
||||||
|
|
||||||
|
| Method | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| setTitle(string $title) | Sets chart title |
|
||||||
|
| setAnimated(boolean $animated) | Enables/disables animation |
|
||||||
|
| setOpacity(int $opacity) | Sets slices' opacity |
|
||||||
|
| addSlice(string $title, double $value, string $color, array $extras = []) | Adds a slice to the chart with the specified color. `$extras` is forwarded on click event |
|
||||||
|
| withOnSliceClickEvent(string $eventName) | Event Name that will be fired when a column of the chart is clicked |
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
composer test
|
composer test
|
||||||
```
|
```
|
||||||
|
|
||||||
### Changelog
|
## Changelog
|
||||||
|
|
||||||
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
|
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user