Skip to content

Commit 2459791

Browse files
committed
docs: enhance README.md for clarity and engagement
1 parent 5c42396 commit 2459791

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
# ChartJS-PHP
22

33
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
4-
[![GitHub Actions Tests](https://github.com/bbsnly/chartjs-php/actions/workflows/php.yml/badge.svg)](https://github.com/bbsnly/chartjs-php/actions)
4+
[![Tests](https://github.com/bbsnly/chartjs-php/actions/workflows/php.yml/badge.svg)](https://github.com/bbsnly/chartjs-php/actions)
55
[![Total Downloads](https://poser.pugx.org/bbsnly/chartjs-php/d/total.svg)](https://packagist.org/packages/bbsnly/chartjs-php)
66
[![Latest Stable Version](https://poser.pugx.org/bbsnly/chartjs-php/v/stable.svg)](https://packagist.org/packages/bbsnly/chartjs-php)
77
[![License](https://poser.pugx.org/bbsnly/chartjs-php/license.svg)](https://packagist.org/packages/bbsnly/chartjs-php)
88

9-
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.
1010

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.
1212

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/>).**
1614

1715
## Installation
1816

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:
2018

2119
```shell
2220
composer require bbsnly/chartjs-php
@@ -29,11 +27,11 @@ Minimum Requirements:
2927

3028
## Usage
3129

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.
3331

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`.
3533

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:
3735

3836
```php
3937
use Bbsnly\ChartJs\Chart;
@@ -94,15 +92,15 @@ In the example below we will use the `toJson` method to generate the JSON repres
9492
9593
## Tests
9694
97-
To run the tests, you can use the following command:
95+
Run the test suite with:
9896
9997
```shell
10098
composer test
10199
```
102100
103101
## Contributing
104102
105-
Please check the [Contributing](CONTRIBUTING.md) guidelines.
103+
Read our [Contributing](CONTRIBUTING.md) guidelines and start improving ChartJS-PHP today.
106104
107105
## License
108106

0 commit comments

Comments
 (0)