PHP Classes

FusionCharts PHP Class API: Generate graphical charts using FusionCharts API

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 57%Total: 544 All time: 5,559 This week: 53Up
Version License PHP version Categories
fusion-charts-api 2.13GNU General Publi...5.3PHP 5, Graphics, Flash
Description 

Author

This package can generate graphical charts using the FusionCharts API.

It provides a base class that can generate HTML and JavaScript for rendering several types of charts supported by the FusionCharts API taking XML code that defines the parameters of the charts.

The package comes also with specialized classes that can generate the necessary XML code with the parameters for several types of charts.

Currently it comes with classes for rendering charts of types column, line, plot, pie and pareto.

The chart classes provide a fluent interface to define any of the supported parameters like the chart data values, chart size, colors, labels, fonts, and other chart specific parameters.

Innovation Award
PHP Programming Innovation award nominee
February 2015
Number 3


Prize: One downloadable copy of PhpED Professional
FusionCharts is a popular charting library that can be controlled using HTML and JavaScript.

This class can generate the necessary HTML and JavaScript to render charts of several types using FusionCharts.

Manuel Lemos
Picture of Lucas de Oliveira
  Performance   Level  
Name: Lucas de Oliveira <contact>
Classes: 5 packages by
Country: Brazil Brazil
Age: 30
All time rank: 2758193 in Brazil Brazil
Week rank: 215 Up19 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 5x

Example

<?php

use FusionCharts\Chart\ColumnLine;
use
FusionCharts\Tag\Categories;
use
FusionCharts\Tag\Category;
use
FusionCharts\Tag\DataSet as Columns;
use
FusionCharts\Tag\Set as Column;

// Data from db
$months = array('Jan', 'Feb', 'Mar', 'Apr');
$values = array(100, 200, 150, 210);

$chart = new ColumnLine('chart-container');

$categories = new Categories();
foreach (
$months as $month) {
   
$category = new Category($month);
   
$categories->addCategory($category);
}

$columns = new Columns();
foreach (
$values as $value) {
   
$column = new Column($value);
   
$columns->addSet($column);
}

$chart
   
->setName('Chart Columns Example')
    ->
setWidth(800)
    ->
setHeight(400)
    ->
setLabelRotate(true)
    ->
setXdescription('x values')
    ->
setYdescription('y values')
    ->
setAttribute('showyaxisvalues', '0')
    ->
addCategories($categories)
    ->
addColumns($columns);

// render chart in the index.php


  Files folder image Files (27)  
File Role Description
Files folder imageexample (1 directory)
Files folder imagelibrary (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file README.md Data Auxiliary data

  Files folder image Files (27)  /  example  
File Role Description
Files folder imagepublic (8 files, 1 directory)

  Files folder image Files (27)  /  example  /  public  
File Role Description
Files folder imagejs (1 file)
  Accessible without login Plain text file columns-line.php Example Example script
  Accessible without login Plain text file columns.php Example Example script
  Accessible without login Plain text file index.php Aux. Auxiliary script
  Accessible without login Plain text file line.php Example Example script
  Accessible without login Plain text file pareto.php Example Example script
  Accessible without login Plain text file pie.php Example Example script
  Accessible without login Plain text file plot.php Example Example script
  Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (27)  /  example  /  public  /  js  
File Role Description
  Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (27)  /  library  
File Role Description
Files folder imageFusionCharts (2 directories)

  Files folder image Files (27)  /  library  /  FusionCharts  
File Role Description
Files folder imageChart (6 files)
Files folder imageTag (8 files)

  Files folder image Files (27)  /  library  /  FusionCharts  /  Chart  
File Role Description
  Plain text file AbstractChart.php Class Class source
  Plain text file ColumnLine.php Class Class source
  Plain text file LineChart.php Class Class source
  Plain text file Pareto.php Class Class source
  Plain text file Pie.php Class Class source
  Plain text file Plot.php Class Class source

  Files folder image Files (27)  /  library  /  FusionCharts  /  Tag  
File Role Description
  Plain text file AbstractTag.php Class Class source
  Plain text file Categories.php Class Class source
  Plain text file Category.php Class Class source
  Plain text file DataSet.php Class Class source
  Plain text file Line.php Class Class source
  Plain text file Set.php Class Class source
  Plain text file TrendLines.php Class Class source
  Plain text file VTrendLines.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:544
This week:0
All time:5,559
This week:53Up
User Ratings User Comments (2)
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:57%StarStarStar
Rank:1670
 
Fala Lucas.
9 years ago (Fábio Gonçalves de Oliveira)
70%StarStarStarStar
Very good! Thanks for inovation!
9 years ago (Denilson Raimundo)
70%StarStarStarStar