PHP Classes
elePHPant
Icontem

PHP Table Chart Builder: Create HTML table with values and calculated cells

Recommend this page to a friend!
  Info   View files Documentation   Screenshots Screenshots   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2017-02-01 (2 years ago) RSS 2.0 feedStarStarStar 59%Total: 371 All time: 6,635 This week: 229Up
Version License PHP version Categories
table-chart-builder 1.0.6MIT/X Consortium ...5HTML, PHP 5, Math
Description Author

This package can create HTML table with values and calculated cells.

It takes an array that defines the title of a table, the header names, values for the cells and expressions to be used in calculated cells.

The class generates a HTML table with provided values and computes the values of the calculated cells based on the column values.

Innovation Award
PHP Programming Innovation award nominee
December 2016
Number 5


Prize: One downloadable copy of PhpED Professional
Many PHP applications display data retrieved from databases or arrays in HTML tables as is, I mean as they are retrieved from the data source.

Often you need to generate reports that show calculations performed on the data displayed in the table columns.

The class can display data in table cells including additional values that show calculated cells that result from operations on column values like total, average, lowest and highest.

Manuel Lemos
  Performance   Level  
Name: Gavin Gordon Markowski <contact>
Classes: 11 packages by
Country: Canada Canada
Age: 31
All time rank: 191847 in Canada Canada
Week rank: 695 Up11 in Canada Canada Up
Innovation award
Innovation award
Nominee: 4x

Details

TableChartBuilder v1.0.6

Build Status

Description

This php class package allows you to create dynamic HTML tables that can calculate column data, like Excel, and look good doing it. Although it is compatible with CSS Bootstrap 3+, Bootstrap is not required for the resulting table to be both responsive, as well as styled beautifully.

How to Use

Install

	$ composer require gavinggordon/tablechartbuilder

Autoload

	include( 'vendor/autoload.php' );

Insantiate

	$table = new GGG\Html\Builders\TableChartBuilder();

Configure

	$table->configure( [
		'title' => '',
		'headers' => [
			'Q1', 'Q2', 'Q3', 'Q4'
		],
		'data' => [
			[ 10000, 5000, 7500, 5000 ],
			[ 13000, 1600, 2500, 8000 ],
			[ 15000, 7400, 3600, 2500 ]
		],
		'equation' => [
			'total', 'average', 'lowest', 'highest'
		]
	] );

Render

	$html = $table->render();
	echo $html;

More Information

PHP Innovation Award

This class has been awarded a PHP Innovation Award, provided by PHPClasses.org. My other PHP classes are accessible online via my GitHub profile or PHPClasses.org profile.

Screenshots  
  • tablechart-inlinecss-example.png
  • tablechart-cssbootstrap-example.png
  Files folder image Files  
File Role Description
Files folder imagebackups (1 file)
Files folder imagesrc (2 files, 3 directories)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE.txt Doc. Documentation
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  backups  
File Role Description
  Accessible without login Plain text file HtmlTableBU.txt Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageAbstracts (1 file)
Files folder imageCalculations (5 files)
Files folder imageInterfaces (1 file)
  Plain text file Table.php Class Class source
  Plain text file TableChartBuilder.php Class Class source

  Files folder image Files  /  src  /  Abstracts  
File Role Description
  Plain text file Calculation.php Class Class source

  Files folder image Files  /  src  /  Calculations  
File Role Description
  Plain text file Average.php Class Class source
  Plain text file Difference.php Class Class source
  Plain text file Highest.php Class Class source
  Plain text file Lowest.php Class Class source
  Plain text file Total.php Class Class source

  Files folder image Files  /  src  /  Interfaces  
File Role Description
  Plain text file CalculationInterface.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 88%
Total:371
This week:0
All time:6,635
This week:229Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:91%StarStarStarStarStar
Examples:-
Tests:-
Videos:-
Overall:59%StarStarStar
Rank:1359