Download the PHP package ondrej-vrto/php-linechart without Composer
On this page you can find all versions of the php package ondrej-vrto/php-linechart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download ondrej-vrto/php-linechart
More information about ondrej-vrto/php-linechart
Files in ondrej-vrto/php-linechart
Download ondrej-vrto/php-linechart
More information about ondrej-vrto/php-linechart
Files in ondrej-vrto/php-linechart
Vendor ondrej-vrto
Package php-linechart
Short Description Generates a simple line chart in SVG format using PHP.
License MIT
Homepage https://github.com/OndrejVrto/php-linechart
Package php-linechart
Short Description Generates a simple line chart in SVG format using PHP.
License MIT
Homepage https://github.com/OndrejVrto/php-linechart
Please rate this library. Is it a good library?
Informations about the package php-linechart
Generates a simple line chart in SVG format using PHP
Installation
You can install the package via composer:
Usage
Creates the following svg string
The generated svg looks like this.
Input data types
It is possible to use the spread operator and insert values individually.
Example data from Laravel Eloquent query.
Customization
withStrokeWidth
will determine the stroke's widthwithOrderReversed
reverses the order of valueswithMaxItemAmount
will determine how many values will be shown. If you originally passed on more values than this max, then the oldest ones will be omitted. If the max amount is set to a number that's higher than the current amount, then the graph will extended.withLockYAxisRange
sets the maximum value of the vertical axis. This is useful if you have multiple charts that should have the same length vertical scale. By default, the maximum value is determined based on the input values.withDimensions
will determine the width and height of the rendered SVGwithColorGradient
you can choose any number of colors. A gradient for the graph is automatically generated from them.
Possible color value types for method withColorGradient()
Color gradien example:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
- Ondrej Vrťo
- All Contributors
Alternatives
License
The MIT License (MIT). Please see License File for more information.
All versions of php-linechart with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.1
illuminate/collections Version ^9.0|^10.0|^11.0
ramsey/uuid Version ^4.7
spatie/color Version ^1.5
illuminate/collections Version ^9.0|^10.0|^11.0
ramsey/uuid Version ^4.7
spatie/color Version ^1.5
The package ondrej-vrto/php-linechart contains the following files
Loading the files please wait ....