Skip to content

Commit 1f0b40e

Browse files
committed
first commit
0 parents  commit 1f0b40e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+8673
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.yml]
18+
indent_size = 2

.gitattributes

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text eol=lf
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
*.c text
7+
*.h text
8+
9+
# Declare files that will always have CRLF line endings on checkout.
10+
*.sln text eol=crlf
11+
12+
# Denote all files that are truly binary and should not be modified.
13+
*.png binary
14+
*.jpg binary
15+
*.otf binary
16+
*.eot binary
17+
*.svg binary
18+
*.ttf binary
19+
*.woff binary
20+
*.woff2 binary
21+
22+
*.css linguist-vendored
23+
*.scss linguist-vendored
24+
*.js linguist-vendored
25+
CHANGELOG.md export-ignore

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/.idea
2+
/.history
3+
/.vscode
4+
/tests/databases
5+
/vendor
6+
.DS_Store
7+
.phpunit.result.cache
8+
composer.phar
9+
composer.lock

.scrutinizer.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
filter:
2+
excluded_paths:
3+
- tests/*
4+
5+
checks:
6+
php:
7+
code_rating: true
8+
9+
tools:
10+
external_code_coverage: true
11+
php_analyzer: true
12+
php_changetracking: true
13+
php_code_sniffer:
14+
config:
15+
standard: "PSR2"
16+
php_cpd: true
17+
php_mess_detector: true
18+
php_pdepend: true
19+
sensiolabs_security_checker: true

.styleci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
preset: psr2
2+
3+
enabled:
4+
- concat_with_spaces

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2022 Akaunting
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# ApexCharts package for Laravel
2+
3+
![Downloads](https://img.shields.io/packagist/dt/akaunting/laravel-apexcharts)
4+
![Tests](https://img.shields.io/github/workflow/status/akaunting/laravel-apexcharts/Tests?label=tests)
5+
[![StyleCI](https://github.styleci.io/repos/452210726/shield?style=flat&branch=master)](https://styleci.io/repos/452210726)
6+
[![Quality](https://img.shields.io/scrutinizer/quality/g/akaunting/laravel-apexcharts?label=quality)](https://scrutinizer-ci.com/g/akaunting/laravel-apexcharts)
7+
[![License](https://img.shields.io/github/license/akaunting/laravel-apexcharts)](LICENSE.md)
8+
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.
10+
11+
## Getting Started
12+
13+
### 1. Install
14+
15+
Run the following command:
16+
17+
```bash
18+
composer require akaunting/laravel-apexcharts
19+
```
20+
21+
### 2. Publish
22+
23+
Publish configuration
24+
25+
```bash
26+
php artisan vendor:publish --tag=apexcharts
27+
```
28+
29+
### 3. Configure
30+
31+
You can change the column sorting settings of your app from `config/apexcharts.php` file
32+
33+
## Usage
34+
35+
```php
36+
use Akaunting\Apexcharts\Charts;
37+
38+
$chart = new Charts();
39+
40+
$chart->setType('donut')
41+
->setWidth('100%')
42+
->setHeight(300)
43+
->setLabels(['Sales', 'Deposit']);
44+
45+
$chart->setDataset('Name', 'donut', [1907, 1923]);
46+
```
47+
48+
## Blade
49+
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"/>
58+
59+
<title>Apexcharts Sample Donut Chart</title>
60+
</head>
61+
62+
<body>
63+
{!! $chart->container() !!}
64+
65+
@apexchartsScripts
66+
67+
{{ $chart->script() }}
68+
</body>
69+
</html>
70+
```
71+
72+
## Changelog
73+
74+
Please see [Releases](../../releases) for more information what has changed recently.
75+
76+
## Contributing
77+
78+
Pull requests are more than welcome. You must follow the PSR coding standards.
79+
80+
## Security
81+
82+
Please review [our security policy](https://github.com/akaunting/laravel-apexcharts/security/policy) on how to report security vulnerabilities.
83+
84+
## Credits
85+
86+
- [Cüneyt Şentürk](https://github.com/cuneytsenturk)
87+
- [All Contributors](../../contributors)
88+
89+
## License
90+
91+
The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.

SECURITY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Security Policy
2+
3+
**PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, [SEE BELOW](#reporting-a-vulnerability).**
4+
5+
## Reporting a Vulnerability
6+
7+
If you discover any security related issues, please email security@akaunting.com instead of using the issue tracker.

composer.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "akaunting/laravel-apexcharts",
3+
"description": "ApexCharts package for Laravel",
4+
"keywords": [
5+
"laravel",
6+
"line",
7+
"bar",
8+
"pie",
9+
"donut",
10+
"charts",
11+
"apexcharts"
12+
],
13+
"license": "MIT",
14+
"authors": [
15+
{
16+
"name": "Cüneyt Şentürk",
17+
"email": "info@akaunting.com",
18+
"homepage": "https://akaunting.com",
19+
"role": "Developer"
20+
}
21+
],
22+
"require": {
23+
"php": ">=7.3",
24+
"illuminate/support": "^8.0",
25+
"ext-json": "*"
26+
},
27+
"require-dev": {
28+
"phpunit/phpunit": ">=9.0",
29+
"orchestra/testbench": ">=6.0"
30+
},
31+
"autoload": {
32+
"psr-4": {
33+
"Akaunting\\Apexcharts\\": "src"
34+
}
35+
},
36+
"autoload-dev": {
37+
"psr-4": {
38+
"Akaunting\\Apexcharts\\Tests\\": "tests"
39+
}
40+
},
41+
"extra": {
42+
"laravel": {
43+
"providers": [
44+
"Akaunting\\Apexcharts\\Provider"
45+
],
46+
"aliases": {
47+
"Apexcharts": "Akaunting\\Apexcharts\\Facade"
48+
}
49+
}
50+
}
51+
}

phpunit.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnError="false"
11+
stopOnFailure="false"
12+
verbose="true"
13+
>
14+
<testsuites>
15+
<testsuite name="Package Test Suite">
16+
<directory suffix="Test.php">tests</directory>
17+
</testsuite>
18+
</testsuites>
19+
<filter>
20+
<whitelist processUncoveredFilesFromWhitelist="true">
21+
<directory suffix=".php">./src</directory>
22+
</whitelist>
23+
</filter>
24+
<php>
25+
<env name="CACHE_DRIVER" value="array"/>
26+
<env name="SESSION_DRIVER" value="array"/>
27+
<env name="QUEUE_DRIVER" value="sync"/>
28+
<env name="QUEUE_CONNECTION" value="sync"/>
29+
<env name="MAIL_DRIVER" value="array"/>
30+
<env name="MAIL_MAILER" value="array"/>
31+
</php>
32+
</phpunit>

0 commit comments

Comments
 (0)