Download the PHP package mhapach/amcharts without Composer
On this page you can find all versions of the php package mhapach/amcharts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package amcharts
amcharts
This package is a Laravel (7.0+) wrapper which helps you create AmCharts charts
Installation
Add AmCharts lib to your project via Composer
Configuration
Copy views to your project:
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
- author name
- All Contributors
License
license. Please see the license file for more information.