Class TcpdfCharts

Description

Located in /tcpdf-charts.php (line 29)

TCPDF
   |
   --TcpdfCharts
Variable Summary
mixed $dbg
Method Summary
void buildMatrixTable (array $headers,  $data, [int $lineHeight = 8], [int $pallette = 1], [int $sort = 2], array $dataset)
void buildPieGraph (array $cdata, [float $r = 50], [int $xc = null], [int $yc = null])
void buildRankTable ( $data,  $lang, [ $lineHeight = 8])
void FancyTable2 ([string $q_type = 'standard'], [string $title = ''], array $options, array $data, [bool $sortOpts = false], [string $sortIdx = 'You'])
array fixPctg (array $a)
void graphHeading (string $text)
array hex2rgb (string $color)
string stringReduce (string $str, int $len, [string $elip = '...'])
Variables
mixed $dbg = 0 (line 31)
Methods
buildMatrixTable (line 462)

Builds the matrix/rank table type

  • version: 1.0
  • see: data format
  • since: 1.0
  • access: public
void buildMatrixTable (array $headers,  $data, [int $lineHeight = 8], [int $pallette = 1], [int $sort = 2], array $dataset)
  • array $headers: array array of keys to use from data array
  • array $dataset: array containing serie data
  • int $lineHeight: height of the lines / text pt (optional)
  • int $pallette: which pallette set to use (optional)
  • int $sort: which sort type to use (optional)
  • $data
buildPieGraph (line 220)

Draw a simple pie chart similar to google-charts pie chart

  • version: 1.0
  • see: data format
  • todo: Text collision detection, line collision detection, custom color pallette (setPiePallette method?),slice pulling
  • since: 1.0
  • access: public
void buildPieGraph (array $cdata, [float $r = 50], [int $xc = null], [int $yc = null])
  • array $cdata: chart data serie
  • float $r: radius of pie chart
  • int $xc: the x coord of the chart (optional)
  • int $yc: the y coord of the chart (optional)
buildRankTable (line 445)

builds a table for a matrix type dataset (multiple rows)

void buildRankTable ( $data,  $lang, [ $lineHeight = 8])
  • $data
  • $lang
  • $lineHeight
FancyTable2 (line 586)

Neat "fancy table 2"

  • version: 1.0
  • see: data format
  • since: 1.0
  • access: public
void FancyTable2 ([string $q_type = 'standard'], [string $title = ''], array $options, array $data, [bool $sortOpts = false], [string $sortIdx = 'You'])
  • string $q_type: type of question - matrix|rank|xref|standard
  • string $title: set the title column (first column) of this table (optional)
  • array $options: simple array of text strings defining options under the title column
  • array $data: array containing serie data
  • bool $sortOpts: whether or not to sort these
  • string $sortIdx: the data serie key to sort these by
fixPctg (line 711)

Make sure our data = 100% .. :-D

  • version: 1.0
  • see: data format
  • since: 1.0
  • access: public
array fixPctg (array $a)
  • array $a: rows to adjust to 100%
graphHeading (line 41)

Just a simple heading for a graph

  • version: 1.0
  • todo: set customized colors/background
  • since: 1.0
  • access: public
void graphHeading (string $text)
  • string $text
hex2rgb (line 740)

Convert a hex string to array(r,g,b) values

  • return: (r=>?,g=>?,b=>?)
  • version: 1.0
  • see: data format
  • since: 1.0
  • access: public
array hex2rgb (string $color)
  • string $color: hexidecimal/HTML color value
stringReduce (line 761)

Reduce the size of a string small enough to fit inside charts

  • version: 1.0
  • since: 1.0
  • access: public
string stringReduce (string $str, int $len, [string $elip = '...'])
  • string $str: string to "reduce"
  • int $len: maximum length for this string to reduce to
  • string $elip: ellipses or text to show string is cut/reduced

Documentation generated on Wed, 26 May 2010 13:19:19 -0400 by phpDocumentor 1.4.3