ChartJs
Introduction #
ChartJS
package contains wrapped widget class for great chart library ChartJS. ChartJS library is very beautiful and rich in features. It is capable of replacing the Google Chart library. Not like Google Charts, ChartJS
package can be used without internet so that is the greatest advantage of this package.
Installation #
By downloading .zip file #
- Download zip file from My Licenses
- Unzip
- Copy the folder
chartjs
intokoolreport
folder, it will look like below:
koolreport
├── core
├── chartjs
By composer #
If you have purchased the package then you can follow these steps to install
- Login to koolreport.com
- Go to My Licenses
- Click Get Token For Composer button
- Copy the text and save to file
auth.json
next tocomposer.json
- Add the repositories to
composer.json
like below - Run
composer update
to install package
composer.json
{
"repositories":[
{"type":"composer","url":"https://repo.koolreport.com"}
],
"require":{
"koolreport/chartjs":"*",
...
}
}
Your auth.json
will look like this:
{
"http-basic": {
"repo.koolreport.com": {
"username": "your@email.com",
"password": "your-secret-token"
}
}
}
Note: Please add your auth.json
to .gitignore
as it contains your secret login information.
Namespace #
All the charts of package are under the namespace \koolreport\chartjs
. You can directly use the class like this to create chart:
\koolreport\chartjs\LineChart::create(array(
...
));
or you can use use
statement on top of page to declare the library before use
<?php
use \koolreport\chartjs\LineChart;
?>
...
<?php
LineChart::create(array(
...
));
?>
Get started with KoolReport
KoolReport will help you to construct good php data report by gathering your data from multiple sources, transforming them into valuable insights, and finally visualizing them in stunning charts and graphs.