PHPackages                             booosta/graph2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. booosta/graph2

ActiveLibrary

booosta/graph2
==============

Multiple graphs for Booosta PHP Framework

v4.0.8(7mo ago)0211LGPL-3.0-onlyPHPPHP &gt;=8.0.0

Since Sep 18Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/buzanits/booosta-graph2)[ Packagist](https://packagist.org/packages/booosta/graph2)[ RSS](/packages/booosta-graph2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (8)Used By (1)

Data charts for Booosta PHP Framework
=====================================

[](#data-charts-for-booosta-php-framework)

This module provides multiple charts for Booosta PHP Framework

Booosta allows to develop PHP web applications quick. It is mainly designed for small web applications. It does not provide a strict MVC distinction. Although the MVC concepts influence the framework. Templates, data objects can be seen as the Vs and Ms of MVC.

Up to version 3 Booosta was available at Sourceforge:  From version 4 on it resides on Github and is available from Packagist under booosta/booosta .

Installation
------------

[](#installation)

This module can be used inside the Booosta framework. If you want to do so, install the framework first. See the [installation instructions](https://github.com/buzanits/booosta-installer) for accomplishing this. If your Booosta is installed, you can install this module.

You also can use this module in your standalone PHP scripts. In both cases you install it with:

```
composer require booosta/graph2

```

Usage in the Booosta framework
------------------------------

[](#usage-in-the-booosta-framework)

In your scripts you use the module:

```
# [...]
$line = $this->makeInstance("\\booosta\\graph2\\Line", $name, $data, $title, $height, $width);
$html = $line->get_html();

```

`$name` is a unique name for the graph object. `$data` is an array in the form `[[x1,y1], [x2, y2] ... ]` holding the coordinates for the line graph. For showing several lines, make the array three dimensional: `[[[x1,y1], [x2, y2] ...], [[x1,y1], [x2, y2] ... ]]``$title` is the title displayed on the graph `$height` and `$witdh` are the size of the whole graph in pixels

Usage in standalone PHP scripts
-------------------------------

[](#usage-in-standalone-php-scripts)

In your PHP script you use:

```
