[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Image/Graph/DataPreprocessor/ -> Array.php (sommaire)

Image_Graph - PEAR PHP OO Graph Rendering Utility. PHP versions 4 and 5

Author: Jesper Veggerby <pear.nosey@veggerby.dk>
Copyright: Copyright (C) 2003, 2004 Jesper Veggerby Hansen
License: http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
Version: CVS: $Id: Array.php,v 1.6 2005/08/24 20:35:59 nosey Exp $
Poids: 103 lignes (4 kb)
Inclus ou requis: 1 fois
Référencé: 0 fois
Nécessite: 1 fichier
 Image/Graph/DataPreprocessor.php

Définit 1 class

Image_Graph_DataPreprocessor_Array:: (2 méthodes):
  Image_Graph_DataPreprocessor_Array()
  _process()


Classe: Image_Graph_DataPreprocessor_Array  - X-Ref

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.

Image_Graph_DataPreprocessor_Array($array)   X-Ref
Image_Graph_ArrayData [Constructor].

param: array $array The array to use as a lookup table

_process($value)   X-Ref
Process the value

param: var $value The value to process/format
return: string The processed value



Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7