{"id":13531990,"url":"https://github.com/laravel-admin-extensions/echarts","last_synced_at":"2025-04-28T15:31:54.313Z","repository":{"id":57003526,"uuid":"194071024","full_name":"laravel-admin-extensions/echarts","owner":"laravel-admin-extensions","description":"baidu echarts for laravel-admin","archived":false,"fork":false,"pushed_at":"2019-06-27T10:43:42.000Z","size":251,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T11:40:32.802Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laravel-admin-extensions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-27T10:02:59.000Z","updated_at":"2024-05-11T04:02:15.000Z","dependencies_parsed_at":"2022-08-21T12:10:20.369Z","dependency_job_id":null,"html_url":"https://github.com/laravel-admin-extensions/echarts","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laravel-admin-extensions%2Fecharts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laravel-admin-extensions%2Fecharts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laravel-admin-extensions%2Fecharts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laravel-admin-extensions%2Fecharts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laravel-admin-extensions","download_url":"https://codeload.github.com/laravel-admin-extensions/echarts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251338705,"owners_count":21573599,"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","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":[],"created_at":"2024-08-01T07:01:07.445Z","updated_at":"2025-04-28T15:31:49.273Z","avatar_url":"https://github.com/laravel-admin-extensions.png","language":"PHP","funding_links":[],"categories":["扩展包"],"sub_categories":["视图类扩展包"],"readme":"# Use Echarts in laravel-admin\n\n## Installation\n\n```bash\ncomposer require jxlwqq/echarts\n\nphp artisan vendor:publish --tag=laravel-admin-echarts\n```\n\n## Configuration\n\nOpen `config/admin.php`, add configurations that belong to this extension at `extensions` section.\n\n```php\n    'extensions' =\u003e [\n        'echarts' =\u003e [\n            // Set to `false` if you want to disable this extension\n            'enable' =\u003e true,\n        ]\n    ]\n```\n\n## Usage\n\nCreate a view in views directory like `resources/views/admin/echarts.blade.php`, and add following codes:\n```html\n\u003c!-- prepare a DOM container with width and height --\u003e\n\u003cdiv id=\"main\" style=\"width: 600px;height:400px;\"\u003e\u003c/div\u003e\n\u003cscript type=\"text/javascript\"\u003e\n    $(function () {\n        // based on prepared DOM, initialize echarts instance\n        var myChart = echarts.init(document.getElementById('main'));\n\n        // specify chart configuration item and data\n        var option = {\n            title: {\n                text: 'ECharts entry example'\n            },\n            tooltip: {},\n            legend: {\n                data: ['Sales']\n            },\n            xAxis: {\n                data: [\"shirt\", \"cardign\", \"chiffon shirt\", \"pants\", \"heels\", \"socks\"]\n            },\n            yAxis: {},\n            series: [{\n                name: 'Sales',\n                type: 'bar',\n                data: [5, 20, 36, 10, 10, 20]\n            }]\n        };\n\n        // use configuration item and data specified to show chart\n        myChart.setOption(option);\n    });\n\u003c/script\u003e\n```\n\nThen show it on the page\n\n```php\nclass EchartsController extends Controller\n{\n    public function index(Content $content)\n    {\n        return $content\n            -\u003eheader('Echarts')\n            -\u003ebody(new Box('echarts demo', view('admin.echarts')));\n    }\n}\n```\n\nFor more usage, please refer to the official [website](https://echarts.apache.org/en/index.html) of echarts.\n\n\nLicense\n------------\nLicensed under [The MIT License (MIT)](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaravel-admin-extensions%2Fecharts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaravel-admin-extensions%2Fecharts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaravel-admin-extensions%2Fecharts/lists"}