You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package helps you to generate [ChartJS](https://www.chartjs.org/"ChartJS")element directly in PHP.
9
+
This package transforms how you create [ChartJS](https://www.chartjs.org/"ChartJS")elements by bringing them directly into PHP.
10
10
11
-
This package is a powerful tool designed to streamline the process of creating[ChartJS](https://www.chartjs.org/"ChartJS")elements. [ChartJS](https://www.chartjs.org/"ChartJS")is a popular JavaScript library used for creating beautiful, responsive, and interactive charts. However, it requires writing JavaScript code, which might not be convenient or efficient in a PHP environment.
11
+
ChartJS-PHP eliminates the complexity of JavaScript when working with [ChartJS](https://www.chartjs.org/"ChartJS") charts. While[ChartJS](https://www.chartjs.org/"ChartJS")traditionally requires JavaScript implementation, our PHP solution delivers the same powerful charts through clean, efficient PHP code. By generating [ChartJS](https://www.chartjs.org/"ChartJS")elements directly in PHP, you write less code, maintain cleaner codebases, and deliver faster results. This is the definitive solution for PHP developers building data visualizations, dashboards, or any application requiring dynamic charts.
12
12
13
-
ChartJS-PHP bridges this gap by allowing developers to generate [ChartJS](https://www.chartjs.org/"ChartJS") elements directly in PHP. This means you can create and manipulate [ChartJS](https://www.chartjs.org/"ChartJS") charts using PHP code, without needing to write any JavaScript. This not only makes your code cleaner and more maintainable, but also enhances productivity by leveraging the power and simplicity of PHP. Whether you're building a data visualization tool, a dashboard, or any application that requires dynamic charts, ChartJS-PHP can be a valuable addition to your PHP toolkit.
14
-
15
-
**For the ChartJS-PHP package to work correctly, install the ChartJS library following the guidelines on their [official documentation](<https://www.chartjs.org/docs/latest/getting-started/>).**
13
+
**Note: Include the ChartJS library in your project as specified in their [official documentation](<https://www.chartjs.org/docs/latest/getting-started/>).**
16
14
17
15
## Installation
18
16
19
-
To install ChartJS-PHP, you can use[Composer](https://getcomposer.org/), a dependency management tool for PHP. Make sure you have Composer installed on your system, and then run the following command in your project directory:
17
+
Installing ChartJS-PHP is straightforward with[Composer](https://getcomposer.org/). Run this command in your project directory:
20
18
21
19
```shell
22
20
composer require bbsnly/chartjs-php
@@ -29,11 +27,11 @@ Minimum Requirements:
29
27
30
28
## Usage
31
29
32
-
To use ChartJS-PHP, you need to create a new instance of the `Chart` class and set the chart type, data, and options. You can then render the chart to generate the HTML and JavaScript code for the chart.
30
+
Creating charts with ChartJS-PHP is simple and intuitive. Start by instantiating the `Chart` class, define your data, and render your chart. The library handles all the complexity for you.
33
31
34
-
In the example below we will create a simple line chart using the `Chart` class. We will set the chart type to `line`, add labels and data to the chart, and set the chart options.
32
+
Choose from our specialized chart classes for even faster development: `BarChart`, `BubbleChart`, `DoughnutChart`, `LineChart`, `PieChart`, `PolarAreaChart`, `RadarChart`, and `ScatterChart`.
35
33
36
-
It is also possible to use `BarChart`, `BubbleChart`, `DoughnutChart`, `LineChart`, `PieChart`, `PolarAreaChart`, `RadarChart`, and `ScatterChart` classes to create the respective chart types.
34
+
Here's how to create a line chart:
37
35
38
36
```php
39
37
use Bbsnly\ChartJs\Chart;
@@ -94,15 +92,15 @@ In the example below we will use the `toJson` method to generate the JSON repres
94
92
95
93
## Tests
96
94
97
-
To run the tests, you can use the following command:
95
+
Run the test suite with:
98
96
99
97
```shell
100
98
composer test
101
99
```
102
100
103
101
## Contributing
104
102
105
-
Please check the [Contributing](CONTRIBUTING.md) guidelines.
103
+
Read our [Contributing](CONTRIBUTING.md) guidelines and start improving ChartJS-PHP today.
0 commit comments