Skip to content

Commit e437b8a

Browse files
committed
upgraded to php 8
1 parent 84ae348 commit e437b8a

39 files changed

+889
-4048
lines changed

.scrutinizer.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

README.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
![Downloads](https://img.shields.io/packagist/dt/akaunting/laravel-apexcharts)
44
![Tests](https://img.shields.io/github/workflow/status/akaunting/laravel-apexcharts/Tests?label=tests)
55
[![StyleCI](https://github.styleci.io/repos/452221855/shield?style=flat&branch=master)](https://styleci.io/repos/452221855)
6-
[![Quality](https://img.shields.io/scrutinizer/quality/g/akaunting/laravel-apexcharts?label=quality)](https://scrutinizer-ci.com/g/akaunting/laravel-apexcharts)
76
[![License](https://img.shields.io/github/license/akaunting/laravel-apexcharts)](LICENSE.md)
87

9-
This package allows you to generate modern and interactive charts using the [ApexCharts](https://apexcharts.com) library directly from Laravel without interacting with JavaScript, CSS, etc.
8+
This package allows you to generate modern and interactive charts using the [ApexCharts](https://apexcharts.com) library directly from `Laravel` without interacting with JavaScript, CSS, etc.
9+
10+
It covers all of the chart [types](https://apexcharts.com/docs/chart-types/line-chart) and [options](https://apexcharts.com/docs/options/annotations) available within the `ApexChart` library.
1011

1112
## Getting Started
1213

@@ -28,14 +29,18 @@ php artisan vendor:publish --tag=apexcharts
2829

2930
### 3. Configure
3031

31-
You can change the column sorting settings of your app from `config/apexcharts.php` file
32+
You can change the chart settings of your app from `config/apexcharts.php` file
3233

3334
## Usage
3435

36+
First of all, create an instance of the `Chart` class and set the data and options according to your needs.
37+
3538
```php
36-
use Akaunting\Apexcharts\Charts;
39+
use Akaunting\Apexcharts\Chart;
3740

38-
$chart = new Charts();
41+
...
42+
43+
$chart = new Chart();
3944

4045
$chart->setType('donut')
4146
->setWidth('100%')
@@ -45,28 +50,25 @@ $chart->setType('donut')
4550
$chart->setDataset('Name', 'donut', [1907, 1923]);
4651
```
4752

48-
## Blade
53+
Then, include the JavaScript (on every page using charts).
4954

50-
```php
51-
<!doctype html>
52-
<html lang="en">
53-
<head>
54-
<meta charset="utf-8">
55-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
56-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
57-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8; charset=ISO-8859-1"/>
55+
```html
56+
...
5857

59-
<title>Apexcharts Sample Donut Chart</title>
60-
</head>
58+
</head>
59+
<body>
60+
...
6161

62-
<body>
63-
{!! $chart->container() !!}
62+
@apexchartsScripts
63+
</body>
64+
```
65+
66+
Finally, call the `container` and `script` method wherever you want to display the chart.
6467

65-
@apexchartsScripts
68+
```php
69+
{!! $chart->container() !!}
6670

67-
{{ $chart->script() }}
68-
</body>
69-
</html>
71+
{!! $chart->script() !!}
7072
```
7173

7274
## Changelog

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
}
2121
],
2222
"require": {
23-
"php": ">=7.3",
24-
"illuminate/support": ">=8.0",
23+
"php": ">=8.0",
24+
"ext-json": "*",
2525
"balping/json-raw-encoder": "^1.0",
26-
"ext-json": "*"
26+
"illuminate/support": ">=8.0"
2727
},
2828
"require-dev": {
2929
"phpunit/phpunit": ">=9.0",

0 commit comments

Comments
 (0)