ereminmdev / yii2-chartjs
Yii2 widget for Chart.js library.
Installs: 50
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.4
- npm-asset/chart.js: ^4.2
- yiisoft/yii2: ~2.0.1
README
Yii2 widget for Chart.js library: https://www.chartjs.org/
Install
composer require --prefer-dist ereminmdev/yii2-chartjs
Documentation
https://www.chartjs.org/docs/latest/
Use
Insert widget into view:
<?= \ereminmdev\yii2\chartjs\ChartJs::widget([
'id' => 'my_chart',
'type' => 'bar',
'data' => [...],
'options' => [
'scales' => [
'y' => [
'beginAtZero' => true,
],
],
'plugins' => [
'legend' => [
'position' => 'bottom',
],
],
],
'plugins' => [...],
]) ?>