PHP Classes

PHP Histogram Titos: Render a histogram of stacked values in a Web page

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 155 All time: 9,023 This week: 488Up
Version License PHP version Categories
histogram-titos 1.0Free For Educatio...5HTML, PHP 5, Graphics, Statistics


This class can render a histogram of stacked values in a Web page.

It take an array of values and generates HTML and CSS to display a histogram the values on a Web page.

The class can take parameters to define the starting value, number of bins, and intervals.

The histogram output includes relative frequency per bin to determine normal distribution of the set of values input.

The normal distribution is the relative percentage to the whole set per bin, that is all values add up to 1 or 100%. It allows to add the frequencies from left to right or right to left to determine the chances of getting in the set something of less or greater value from a particular bin.

The class also returns HTML for notes about the histogram.

Picture of Jorge Guerrero
  Performance   Level  
Name: Jorge Guerrero <contact>
Classes: 1 package by
Country: Mexico Mexico
Age: ???
All time rank: 426651 in Mexico Mexico
Week rank: 264 Up4 in Mexico Mexico Up


<!DOCTYPE html>
<head><title>Histogram Call File</title></head>
<h4>Tito's Histogram</h4>
<p>The following Histogram takes in an array of monthly salaries offered for PHP Programmers in Mexico City for the months of September and October 2016.
All Values are in New Mexican Pesos <em>in Thousands</em>
include 'Histogram.php';


$histogram=new histogram();

$chart=$histogram->histogramTitos('Starting Monthly Salaries',$Salaries);

You may output as many histograms in a single file as needed just be sure to change the title for each!

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Calling Script for Class HistogramTitos
Plain text file Histogram.php Class HistogramTitosZip

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,023
This week:488Up