{"id":15908102,"url":"https://github.com/fxcosta/laravel-chartjs","last_synced_at":"2025-10-19T10:22:56.657Z","repository":{"id":34906251,"uuid":"38946123","full_name":"fxcosta/laravel-chartjs","owner":"fxcosta","description":"Simple package to facilitate and automate the use of charts in Laravel 5.x using Chartjs v2 library","archived":false,"fork":false,"pushed_at":"2024-01-02T14:52:44.000Z","size":82,"stargazers_count":485,"open_issues_count":30,"forks_count":116,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-05-29T11:45:39.283Z","etag":null,"topics":["chart","chartjs","laravel","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"googlecodelabs/kotlin-coroutines","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fxcosta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-12T01:23:44.000Z","updated_at":"2025-05-19T02:40:19.000Z","dependencies_parsed_at":"2024-06-18T12:23:21.409Z","dependency_job_id":"7738adf2-7fbd-4351-84f5-45c0796480ea","html_url":"https://github.com/fxcosta/laravel-chartjs","commit_stats":{"total_commits":88,"total_committers":19,"mean_commits":4.631578947368421,"dds":"0.34090909090909094","last_synced_commit":"255154a4a6b57fb146eba4fdedcef4d1fe075e68"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/fxcosta/laravel-chartjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxcosta%2Flaravel-chartjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxcosta%2Flaravel-chartjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxcosta%2Flaravel-chartjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxcosta%2Flaravel-chartjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fxcosta","download_url":"https://codeload.github.com/fxcosta/laravel-chartjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxcosta%2Flaravel-chartjs/sbom","scorecard":{"id":415372,"data":{"date":"2025-08-11","repo":{"name":"github.com/fxcosta/laravel-chartjs","commit":"c7748ac3a5f68324d0e02cac2e3a98d279c8de75"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Code-Review","score":8,"reason":"Found 13/16 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T23:41:14.874Z","repository_id":34906251,"created_at":"2025-08-18T23:41:14.874Z","updated_at":"2025-08-18T23:41:14.874Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279779110,"owners_count":26225479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-19T02:00:07.647Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chart","chartjs","laravel","php"],"created_at":"2024-10-06T14:09:43.210Z","updated_at":"2025-10-19T10:22:56.624Z","avatar_url":"https://github.com/fxcosta.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# laravel-chartjs - Chart.js v2 wrapper for Laravel 5.x\n\n# ⛔️ DEPRECATED\nThis repository is now deprecated. Use [@icehouse-ventures](https://github.com/icehouse-ventures/laravel-chartjs) instead for newer updates\n\n*No Longer Maintained*. This lib is basically a bridge to Chartjs so it is very likely that some problem or issue is better resolved in the Chartjs repository itself.\n\nSimple package to facilitate and automate the use of charts in Laravel 5.x\nusing the [Chart.js](http://www.chartjs.org/) v2 library from Nick Downie.\n\n# Setup:\n```\ncomposer require fx3costa/laravelchartjs\n```\n\nAnd add the Service Provider in your file config/app.php:\n```php\nFx3costa\\LaravelChartJs\\Providers\\ChartjsServiceProvider::class\n```\n\nFinally, for now, you must install and add to your layouts / templates the Chartjs library that can be easily\nfound for download at: http://www.chartjs.org. This setting will also be improved.\n\n# Usage:\n\nYou can request to Service Container the service responsible for building the charts\nand passing through fluent interface the chart settings.\n\n```php\n$service = app()-\u003echartjs\n    -\u003ename()\n    -\u003etype()\n    -\u003esize()\n    -\u003elabels()\n    -\u003edatasets()\n    -\u003eoptions();\n```\n\nFor now the builder needs the name of the chart, the type of chart that can be anything that is supported by chartjs and the other custom configurations like labels, datasets, size and options.\n\nIn the dataset interface you can pass any configuration and option to your chart.\nAll options available in chartjs documentation are supported.\nJust write the configuration with php array notations and its work!\n\n# Advanced chartjs options\n\nSince the current version allows it to add simple json string based options, it is not possible to generate options like:\n\n```php\n    options: {\n        scales: {\n            xAxes: [{\n                type: 'time',\n                time: {\n                    displayFormats: {\n                        quarter: 'MMM YYYY'\n                    }\n                }\n            }]\n        }\n    }\n```\n\nUsing the method optionsRaw(string) its possible to add a the options in raw format:\n\nPassing string format like a json\n```php\n        $chart-\u003eoptionsRaw(\"{\n            legend: {\n                display:false\n            },\n            scales: {\n                xAxes: [{\n                    gridLines: {\n                        display:false\n                    }  \n                }]\n            }\n        }\");\n```\n\nOr, if you prefer, you can pass a php array format\n\n```php\n$chart-\u003eoptionsRaw([\n    'legend' =\u003e [\n        'display' =\u003e true,\n        'labels' =\u003e [\n            'fontColor' =\u003e '#000'\n        ]\n    ],\n    'scales' =\u003e [\n        'xAxes' =\u003e [\n            [\n                'stacked' =\u003e true,\n                'gridLines' =\u003e [\n                    'display' =\u003e true\n                ]\n            ]\n        ]\n    ]\n]);\n```\n\n\n# Examples\n\n1 - Line Chart / Radar Chart:\n```php\n// ExampleController.php\n\n$chartjs = app()-\u003echartjs\n        -\u003ename('lineChartTest')\n        -\u003etype('line')\n        -\u003esize(['width' =\u003e 400, 'height' =\u003e 200])\n        -\u003elabels(['January', 'February', 'March', 'April', 'May', 'June', 'July'])\n        -\u003edatasets([\n            [\n                \"label\" =\u003e \"My First dataset\",\n                'backgroundColor' =\u003e \"rgba(38, 185, 154, 0.31)\",\n                'borderColor' =\u003e \"rgba(38, 185, 154, 0.7)\",\n                \"pointBorderColor\" =\u003e \"rgba(38, 185, 154, 0.7)\",\n                \"pointBackgroundColor\" =\u003e \"rgba(38, 185, 154, 0.7)\",\n                \"pointHoverBackgroundColor\" =\u003e \"#fff\",\n                \"pointHoverBorderColor\" =\u003e \"rgba(220,220,220,1)\",\n                'data' =\u003e [65, 59, 80, 81, 56, 55, 40],\n            ],\n            [\n                \"label\" =\u003e \"My Second dataset\",\n                'backgroundColor' =\u003e \"rgba(38, 185, 154, 0.31)\",\n                'borderColor' =\u003e \"rgba(38, 185, 154, 0.7)\",\n                \"pointBorderColor\" =\u003e \"rgba(38, 185, 154, 0.7)\",\n                \"pointBackgroundColor\" =\u003e \"rgba(38, 185, 154, 0.7)\",\n                \"pointHoverBackgroundColor\" =\u003e \"#fff\",\n                \"pointHoverBorderColor\" =\u003e \"rgba(220,220,220,1)\",\n                'data' =\u003e [12, 33, 44, 44, 55, 23, 40],\n            ]\n        ])\n        -\u003eoptions([]);\n\nreturn view('example', compact('chartjs'));\n\n\n // example.blade.php\n\n\u003cdiv style=\"width:75%;\"\u003e\n    {!! $chartjs-\u003erender() !!}\n\u003c/div\u003e\n```\n\n\n2 - Bar Chart:\n```php\n// ExampleController.php\n\n$chartjs = app()-\u003echartjs\n         -\u003ename('barChartTest')\n         -\u003etype('bar')\n         -\u003esize(['width' =\u003e 400, 'height' =\u003e 200])\n         -\u003elabels(['Label x', 'Label y'])\n         -\u003edatasets([\n             [\n                 \"label\" =\u003e \"My First dataset\",\n                 'backgroundColor' =\u003e ['rgba(255, 99, 132, 0.2)', 'rgba(54, 162, 235, 0.2)'],\n                 'data' =\u003e [69, 59]\n             ],\n             [\n                 \"label\" =\u003e \"My First dataset\",\n                 'backgroundColor' =\u003e ['rgba(255, 99, 132, 0.3)', 'rgba(54, 162, 235, 0.3)'],\n                 'data' =\u003e [65, 12]\n             ]\n         ])\n         -\u003eoptions([]);\n\nreturn view('example', compact('chartjs'));\n\n\n // example.blade.php\n\n\u003cdiv style=\"width:75%;\"\u003e\n    {!! $chartjs-\u003erender() !!}\n\u003c/div\u003e\n```\n\n\n3 - Pie Chart / Doughnut Chart:\n```php\n// ExampleController.php\n\n$chartjs = app()-\u003echartjs\n        -\u003ename('pieChartTest')\n        -\u003etype('pie')\n        -\u003esize(['width' =\u003e 400, 'height' =\u003e 200])\n        -\u003elabels(['Label x', 'Label y'])\n        -\u003edatasets([\n            [\n                'backgroundColor' =\u003e ['#FF6384', '#36A2EB'],\n                'hoverBackgroundColor' =\u003e ['#FF6384', '#36A2EB'],\n                'data' =\u003e [69, 59]\n            ]\n        ])\n        -\u003eoptions([]);\n\nreturn view('example', compact('chartjs'));\n\n\n // example.blade.php\n\n\u003cdiv style=\"width:75%;\"\u003e\n    {!! $chartjs-\u003erender() !!}\n\u003c/div\u003e\n```\n\n\n# OBS:\n\nThis README, as well as the package, is in development, but will be constantly updated and I will keep you informed as soon as\nit is ready for production. Thank you for understanding.\n\nAny questions or suggestions preferably open a issue!\n\n# License\nLaravelChartJs is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffxcosta%2Flaravel-chartjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffxcosta%2Flaravel-chartjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffxcosta%2Flaravel-chartjs/lists"}