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

Class: Image_Graph_Dataset_Trivial

Source Location: /Image_Graph-0.8.0/Graph/Dataset/Trivial.php

Class Overview

Image_Graph_Dataset
   |
   --Image_Graph_Dataset_Trivial

Trivial data set, simply add points (x, y) 1 by 1


Author(s):

Version:

  • Release: 0.8.0

Copyright:

  • 2003-2009 The PHP Group

Methods


Child classes:

Image_Graph_Dataset_Sequential
Sequential data set, simply add points (y) 1 by 1.
Image_Graph_Dataset_Random
Random data set, points are generated by random.

Inherited Variables

Inherited Methods

Class: Image_Graph_Dataset

Image_Graph_Dataset::Image_Graph_Dataset()
Image_Graph_Dataset [Constructor]
Image_Graph_Dataset::addPoint()
Add a point to the dataset
Image_Graph_Dataset::count()
The number of values in the dataset
Image_Graph_Dataset::first()
The first point
Image_Graph_Dataset::last()
The last point
Image_Graph_Dataset::maximumX()
The maximum X value
Image_Graph_Dataset::maximumY()
The maximum Y value
Image_Graph_Dataset::minimumX()
The minimum X value
Image_Graph_Dataset::minimumY()
The minimum Y value
Image_Graph_Dataset::setName()
Sets the name of the data set, used for legending

Class Details

[line 50]
Trivial data set, simply add points (x, y) 1 by 1


[ Top ]


Method Detail

Image_Graph_Dataset_Trivial (Constructor)   [line 75]

Image_Graph_Dataset_Trivial Image_Graph_Dataset_Trivial( [array $dataArray = false])

Image_Graph_Dataset_Trivial [Constructor]

Pass an associated array ($data[$x] = $y) to the constructor for easy data addition. Alternatively (if multiple entries with same x value is required) pass an array with (x, y) values: $data[$id] = array('x' => $x, 'y' => $y);

NB! If passing the 1st type array at this point, the x-values will also be used for ID tags, i.e. when using Image_Graph_Fill_Array. In the 2nd type the key/index of the "outermost" array will be the id tag (i.e. $id in the example)


Parameters:

array   $dataArray   —  An associated array with values to the dataset

[ Top ]

addPoint   [line 114]

void addPoint( int $x, [int $y = false], [var $ID = false])

Add a point to the dataset

$ID can contain either the ID of the point, i.e. 'DK', 123, 'George', etc. or it can contain values used for creation of the HTML image map. This is achieved using is an an associated array with the following values:

'url' The URL to create the link to

'alt' [optional] The alt text on the link

'target' [optional] The target of the link

'htmltags' [optional] An associated array with html tags (tag as key), fx. 'onMouseOver' => 'history.go(-1);', 'id' => 'thelink'


Overridden in child classes as:

Image_Graph_Dataset_Sequential::addPoint()
Add a point to the dataset

Overrides Image_Graph_Dataset::addPoint() (Add a point to the dataset)

Parameters:

int   $x   —  The X value to add
int   $y   —  The Y value to add, can be omited
var   $ID   —  The ID of the point

[ Top ]

count   [line 229]

int count( )

The number of values in the dataset
  • Return: The number of values in the dataset

Overrides Image_Graph_Dataset::count() (The number of values in the dataset)
[ Top ]

first   [line 136]

array first( )

The first point
  • Return: The first point

Overrides Image_Graph_Dataset::first() (The first point)
[ Top ]

last   [line 147]

array last( )

The last point
  • Return: The last point

Overrides Image_Graph_Dataset::last() (The last point)
[ Top ]


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