定制 dragonofmercy/laravel-apexcharts 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dragonofmercy/laravel-apexcharts

最新稳定版本:1.0

Composer 安装命令:

composer require dragonofmercy/laravel-apexcharts

包简介

ApexCharts builder for Laravel

README 文档

README

A powerful and flexible ApexCharts wrapper package for Laravel 12, providing an elegant PHP API to build beautiful, interactive charts in your Laravel applications.

Features

  • 🎨 Full ApexCharts API support with fluent PHP interface
  • 📊 Support for all chart types (Line, Bar, Area, Pie, Donut, Radar, and more)
  • 🌍 Built-in internationalization with 50+ locales
  • 🎯 Type-safe enums for chart options
  • 🔧 Highly configurable with sensible defaults
  • 💪 PHP 8.2+ with modern type declarations
  • 🚀 Easy integration with Blade templates

Requirements

  • PHP 8.2 or higher
  • Laravel 12.0 or higher

Getting Started

1. Install the package

composer require dragonofmercy/laravel-apexcharts

2. Publish assets

php artisan vendor:publish --tag=apexcharts

3. Configure

You can change the chart settings of your app from config/apexcharts.php file

Usage example

use ApexCharts\Builder;
use ApexCharts\Options\Chart;
use ApexCharts\Options\Serie;
use ApexCharts\Enums\ChartType;

$chart = (new Builder())
    ->chart(Chart::make()->type(ChartType::Line)->height(350))
    ->labels(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']);
    ->serie(Serie::make()->name('Sales')->data([30, 40, 35, 50, 49, 60]))
    ->toJson();

echo $chart->renderChart();

This package don't auto-include the ApexCharts library you have to do it manually.
You can include it directly in your layout file or use a CDN.

<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>

or via npm

npm install apexcharts
import ApexCharts from 'apexcharts';
window.ApexCharts = ApexCharts;

Implementation Status

✅ annotations
✅ chart
✅ colors
✅ dataLabels
✅ fill
✅ forecastDataPoints
✅ grid
✅ labels
✅ legend
✅ markers
✅ noData
✅ plotOptions
✅ responsive
✅ series
✅ states
✅ stroke
✅ theme
✅ title
✅ subtitle
✅ tooltip
✅ xaxis
✅ yaxis

Additional Features

✅ Chart auto brush

License

This package is open-sourced software licensed under the MIT license.

Support

If this project helps to increase your productivity, you can give me a cup of coffee :)

Donate

Credits

Links

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-02