-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1f0b40e
Showing
53 changed files
with
8,673 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; This file is for unifying the coding style for different editors and IDEs. | ||
; More information at https://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text eol=lf | ||
|
||
# Explicitly declare text files you want to always be normalized and converted | ||
# to native line endings on checkout. | ||
*.c text | ||
*.h text | ||
|
||
# Declare files that will always have CRLF line endings on checkout. | ||
*.sln text eol=crlf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.jpg binary | ||
*.otf binary | ||
*.eot binary | ||
*.svg binary | ||
*.ttf binary | ||
*.woff binary | ||
*.woff2 binary | ||
|
||
*.css linguist-vendored | ||
*.scss linguist-vendored | ||
*.js linguist-vendored | ||
CHANGELOG.md export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/.idea | ||
/.history | ||
/.vscode | ||
/tests/databases | ||
/vendor | ||
.DS_Store | ||
.phpunit.result.cache | ||
composer.phar | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
filter: | ||
excluded_paths: | ||
- tests/* | ||
|
||
checks: | ||
php: | ||
code_rating: true | ||
|
||
tools: | ||
external_code_coverage: true | ||
php_analyzer: true | ||
php_changetracking: true | ||
php_code_sniffer: | ||
config: | ||
standard: "PSR2" | ||
php_cpd: true | ||
php_mess_detector: true | ||
php_pdepend: true | ||
sensiolabs_security_checker: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
preset: psr2 | ||
|
||
enabled: | ||
- concat_with_spaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2022 Akaunting | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# ApexCharts package for Laravel | ||
|
||
![Downloads](https://img.shields.io/packagist/dt/akaunting/laravel-apexcharts) | ||
![Tests](https://img.shields.io/github/workflow/status/akaunting/laravel-apexcharts/Tests?label=tests) | ||
[![StyleCI](https://github.styleci.io/repos/452210726/shield?style=flat&branch=master)](https://styleci.io/repos/452210726) | ||
[![Quality](https://img.shields.io/scrutinizer/quality/g/akaunting/laravel-apexcharts?label=quality)](https://scrutinizer-ci.com/g/akaunting/laravel-apexcharts) | ||
[![License](https://img.shields.io/github/license/akaunting/laravel-apexcharts)](LICENSE.md) | ||
|
||
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. | ||
|
||
## Getting Started | ||
|
||
### 1. Install | ||
|
||
Run the following command: | ||
|
||
```bash | ||
composer require akaunting/laravel-apexcharts | ||
``` | ||
|
||
### 2. Publish | ||
|
||
Publish configuration | ||
|
||
```bash | ||
php artisan vendor:publish --tag=apexcharts | ||
``` | ||
|
||
### 3. Configure | ||
|
||
You can change the column sorting settings of your app from `config/apexcharts.php` file | ||
|
||
## Usage | ||
|
||
```php | ||
use Akaunting\Apexcharts\Charts; | ||
|
||
$chart = new Charts(); | ||
|
||
$chart->setType('donut') | ||
->setWidth('100%') | ||
->setHeight(300) | ||
->setLabels(['Sales', 'Deposit']); | ||
|
||
$chart->setDataset('Name', 'donut', [1907, 1923]); | ||
``` | ||
|
||
## Blade | ||
|
||
```php | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8; charset=ISO-8859-1"/> | ||
|
||
<title>Apexcharts Sample Donut Chart</title> | ||
</head> | ||
|
||
<body> | ||
{!! $chart->container() !!} | ||
|
||
@apexchartsScripts | ||
|
||
{{ $chart->script() }} | ||
</body> | ||
</html> | ||
``` | ||
|
||
## Changelog | ||
|
||
Please see [Releases](../../releases) for more information what has changed recently. | ||
|
||
## Contributing | ||
|
||
Pull requests are more than welcome. You must follow the PSR coding standards. | ||
|
||
## Security | ||
|
||
Please review [our security policy](https://github.com/akaunting/laravel-apexcharts/security/policy) on how to report security vulnerabilities. | ||
|
||
## Credits | ||
|
||
- [Cüneyt Şentürk](https://github.com/cuneytsenturk) | ||
- [All Contributors](../../contributors) | ||
|
||
## License | ||
|
||
The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Security Policy | ||
|
||
**PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, [SEE BELOW](#reporting-a-vulnerability).** | ||
|
||
## Reporting a Vulnerability | ||
|
||
If you discover any security related issues, please email [email protected] instead of using the issue tracker. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"name": "akaunting/laravel-apexcharts", | ||
"description": "ApexCharts package for Laravel", | ||
"keywords": [ | ||
"laravel", | ||
"line", | ||
"bar", | ||
"pie", | ||
"donut", | ||
"charts", | ||
"apexcharts" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Cüneyt Şentürk", | ||
"email": "[email protected]", | ||
"homepage": "https://akaunting.com", | ||
"role": "Developer" | ||
} | ||
], | ||
"require": { | ||
"php": ">=7.3", | ||
"illuminate/support": "^8.0", | ||
"ext-json": "*" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": ">=9.0", | ||
"orchestra/testbench": ">=6.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Akaunting\\Apexcharts\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Akaunting\\Apexcharts\\Tests\\": "tests" | ||
} | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Akaunting\\Apexcharts\\Provider" | ||
], | ||
"aliases": { | ||
"Apexcharts": "Akaunting\\Apexcharts\\Facade" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnError="false" | ||
stopOnFailure="false" | ||
verbose="true" | ||
> | ||
<testsuites> | ||
<testsuite name="Package Test Suite"> | ||
<directory suffix="Test.php">tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">./src</directory> | ||
</whitelist> | ||
</filter> | ||
<php> | ||
<env name="CACHE_DRIVER" value="array"/> | ||
<env name="SESSION_DRIVER" value="array"/> | ||
<env name="QUEUE_DRIVER" value="sync"/> | ||
<env name="QUEUE_CONNECTION" value="sync"/> | ||
<env name="MAIL_DRIVER" value="array"/> | ||
<env name="MAIL_MAILER" value="array"/> | ||
</php> | ||
</phpunit> |
Oops, something went wrong.