ziwot / cake-chartscss
ChartsCss plugin for CakePHP
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:cakephp-plugin
Requires
- php: >=8.1
- cakephp/cakephp: ^5.0.1
Requires (Dev)
- cakephp/cakephp-codesniffer: ^5.2
- phpunit/phpunit: ^10.5.5 || ^11.1.3
README
ChartsCss plugin for CakePHP
Install with:
composer require ziwot/cake-chartscss
Load the plugin:
bin/cake plugin load ChartsCss
Link assets:
cake plugin assets symlink
You should also add it to your .gitignore
:
# Plugins
/webroot/charts_css
Of course, when you deploy to prod, then, copy the assets:
cake plugin assets copy
Example Usage:
<?php
/**
* @var \App\View\AppView $this
*/
$this->append('css', $this->Html->css('ChartsCss.charts.min'));
$data = [
2020 => '$ .6',
2021 => '$ .7',
2022 => '$ .77',
2023 => '$ .73',
2024 => '$ .80',
2025 => .88,
];
?>
<?= $this->Chart->make($data, [
'caption' => 'Coffee Value',
'table' => 'area show-heading show-labels data-outside show-primary-axis show-4-secondary-axes',
]) ?>