[ class tree: Image_Graph ] [ index: Image_Graph ] [ all elements ]

Class: Image_Graph_DataPreprocessor_Array

Source Location: /Image_Graph-0.8.0/Graph/DataPreprocessor/Array.php

Class Overview


Format data as looked up in an array.



  • Release: 0.8.0


  • 2003-2009 The PHP Group


Child classes:

Formatting values using a sequential data label array, ie. returning the 'next label' when asked for any label.

Inherited Variables

Inherited Methods

Class Details

[line 66]
Format data as looked up in an array.

ArrayData is useful when a numercal value is to be translated to something thats cannot directly be calculated from this value, this could for example be a dataset meant to plot population of various countries. Since x- values are numerical and they should really be country names, but there is no linear correlation between the number and the name, we use an array to 'map' the numbers to the name, i.e. $array[0] = 'Denmark'; $array[1] = 'Sweden'; ..., where the indexes are the numerical values from the dataset. This is NOT usefull when the x-values are a large domain, i.e. to map unix timestamps to date-strings for an x-axis. This is because the x-axis will selecte arbitrary values for labels, which would in principle require the ArrayData to hold values for every unix timestamp. However ArrayData can still be used to solve such a situation, since one can use another value for X-data in the dataset and then map this (smaller domain) value to a date. That is we for example instead of using the unix-timestamp we use value 0 to represent the 1st date,

  1. to represent the next date, etc.

[ Top ]

Method Detail

Image_Graph_DataPreprocessor_Array (Constructor)   [line 81]

Image_Graph_DataPreprocessor_Array Image_Graph_DataPreprocessor_Array( array $array)

Image_Graph_ArrayData [Constructor].


array   $array   —  The array to use as a lookup table

[ Top ]

Documentation generated on Mon, 11 Mar 2019 15:39:33 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.