PHP Class FlotChart

Mostra file Open project: openeyes/openeyes Class Usage Examples

Public Properties

Property Type Description
$chart_id
$legend_id

Protected Properties

Property Type Description
$has_data
$options
$point_labels
$series
$x_max
$x_min
$yaxis_map

Public Methods

Method Description
addPoint ( string $series_name, float $x, float $y, string $label = null ) : FlotChart Add a point to the specified data series (creating it if it doesn't exist).
configureChart ( array $config ) : FlotChart Apply configuration to the chart as a whole.
configureSeries ( string $series_name, array $config ) : FlotChart Configure a data series, creating it if it doesn't exist.
configureXAxis ( array $config = [] ) : FlotChart Configure the X axis.
configureYAxis ( string $axis_name, array $config = [] ) : FlotChart Add and/or configure a Y axis.
getXMax ( ) : float Get the highest X value added to the graph so far (or null if none).
getXMin ( ) : float | null Get the lowest X value added to the graph so far (or null if none).
hasData ( ) : boolean Whether there are any points in the graph yet.
run ( ) Render the chart.

Protected Methods

Method Description
initSeries ( $series_name )

Method Details

addPoint() public method

Add a point to the specified data series (creating it if it doesn't exist).
public addPoint ( string $series_name, float $x, float $y, string $label = null ) : FlotChart
$series_name string
$x float
$y float
$label string
return FlotChart

configureChart() public method

Apply configuration to the chart as a whole.
public configureChart ( array $config ) : FlotChart
$config array
return FlotChart

configureSeries() public method

Configure a data series, creating it if it doesn't exist.
public configureSeries ( string $series_name, array $config ) : FlotChart
$series_name string
$config array
return FlotChart

configureXAxis() public method

Configure the X axis.
public configureXAxis ( array $config = [] ) : FlotChart
$config array
return FlotChart

configureYAxis() public method

Add and/or configure a Y axis.
public configureYAxis ( string $axis_name, array $config = [] ) : FlotChart
$axis_name string
$config array
return FlotChart

getXMax() public method

Get the highest X value added to the graph so far (or null if none).
public getXMax ( ) : float
return float

getXMin() public method

Get the lowest X value added to the graph so far (or null if none).
public getXMin ( ) : float | null
return float | null

hasData() public method

Whether there are any points in the graph yet.
public hasData ( ) : boolean
return boolean

initSeries() protected method

protected initSeries ( $series_name )

run() public method

Render the chart.
public run ( )

Property Details

$chart_id public_oe property

public $chart_id

$has_data protected_oe property

protected $has_data

$legend_id public_oe property

public $legend_id

$options protected_oe property

protected $options

$point_labels protected_oe property

protected $point_labels

$series protected_oe property

protected $series

$x_max protected_oe property

protected $x_max

$x_min protected_oe property

protected $x_min

$yaxis_map protected_oe property

protected $yaxis_map