定制 mhapach/amcharts 二次开发

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

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

mhapach/amcharts

最新稳定版本:0.0.4

Composer 安装命令:

composer require mhapach/amcharts

包简介

am charts laravel php library

README 文档

README

Latest Version on Packagist Total Downloads Build Status StyleCI

This package is a Laravel (7.0+) wrapper which helps you create AmCharts charts

Installation

Add AmCharts lib to your project via Composer

$ composer require mhapach/amcharts

Configuration

Copy views to your project:

php artisan vendor:publish --provider="mhapach\AmCharts\Providers\AmChartsProvider"

Usage

In your controller create instance of AmChart with name of chart that corresponds to directory structure in your resource/views/vendor/amcharts

    $chart = new AmChart('xy.column_stacked');
    $chart->setLibraries([
        'https://cdn.amcharts.com/lib/5/index.js',
        "https://cdn.amcharts.com/lib/5/xy.js",
        'https://cdn.amcharts.com/lib/5/themes/Animated.js',
        'https://cdn.amcharts.com/lib/5/themes/Responsive.js',
        'https://cdn.amcharts.com/lib/5/locales/ru_RU.js',
    ]);

    $chart->setData(
        [[
            "year"=> "2021",
            "europe"=> 2.5,
            "namerica"=> 2.5,
            "asia"=> 2.1,
            "lamerica"=> 1,
            "meast"=> 0.8,
            "africa"=> 0.4
        ], [
            "year"=> "2022",
            "europe"=> 2.6,
            "namerica"=> 2.7,
            "asia"=> 2.2,
            "lamerica"=> 0.5,
            "meast"=> 0.4,
            "africa"=> 0.3
        ], [
            "year"=> "2023",
            "europe"=> 2.8,
            "namerica"=> 2.9,
            "asia"=> 2.4,
            "lamerica"=> 0.3,
            "meast"=> 0.9,
            "africa"=> 0.5
        ]]

    );

    print $chart->render();

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-07-24