ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions
graph_map_1_0_0 Class Reference

## Public Member Functions
| compile_map_items ($DataY, $DataX)
| view_map (&$Options)

## Detailed Description

Working with graphs.

Author
  Dodonov A.A.

Definition at line 26 of file graph_map.php.

## Member Function Documentation

compile_map_items | ( |  | $DataY,
|  |  | $DataX
| ) |  |

Function compiles map.

Parameters

  $DataY | - Data for the graph.
  $DataX | - Data for the graph.

Returns
  Map.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 95 of file graph_map.php.

{
try
{
$GlobalCenterX = $this->ClientX + $this->CoordX;
$GlobalCenterY = $this->Height - $this->ClientY - $this->CoordY;
list( $dX , $dY ) = $this->get_scales( $DataX , $DataY );
$c = count( $DataX );
$this->Output = '';
for( $i = 0 ; $i < $c ; $i++ )
{
$x = intval( $GlobalCenterX + ( $DataX[ $i ] - min( $DataX ) ) * $dX + $this->MarginLeft );
$y = intval( $GlobalCenterY - ( $DataY[ $i + 0 ] - min( $DataY ) ) * $dY - $this->MarginBottom );
$this->compile_area( $DataY[ $i ] , "$x,$y" );
}
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

view_map | ( | & | $Options | ) |

Component's view.

Parameters

  $Options | - Settings.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 180 of file graph_map.php.

{
try
{
$this->prepare_map_generation( $Options );
$DataY = explode( ',' , $Options->get_setting( 'data_y' ) );
$DataX = explode( ',' , $Options->get_setting( 'data_x' ) );
$this->compile_map_items( $DataY , $DataX );
$MapName = $Options->get_setting( 'map_name' , 'graph_map' );
$this->Output = $this->CachedMultyFS->get_template( __FILE__ , 'map.tpl' );
$this->Output = str_replace(
array( '{map_name}' , '{output}' ) , array( $MapName , $this->Output ) , $this->Output
);
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

The documentation for this class was generated from the following file:

- packages/graph/packages/graph_map/graph_map.php