Class: I2CE CustomReport Display PieChart (Development): Difference between revisions

From IHRIS Wiki
(Created page with '{{otherversions|Class: I2CE_CustomReport_Display_PieChart}} This article describes the class ''I2CE_CustomReport_Display_PieChart'' . *Extends the class: [[Class: I2CE_CustomRepo…')
 
No edit summary
 
Line 13: Line 13:
===$displayedChartFields===
===$displayedChartFields===
An array with values the name of the columns used for this display
An array with values the name of the columns used for this display
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L238 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 238
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L293 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 293
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $displayedChartFields
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $displayedChartFields


===$displayedChartFieldsIndices===
===$displayedChartFieldsIndices===
An array (or an array or arrays) with keys the values of the charted fields and  values the index row (row and col) they are in the $chart['chart_data'] array @var protected array $displayedChartFields
An array (or an array or arrays) with keys the values of the charted fields and  values the index row (row and col) they are in the $chart['chart_data'] array @var protected array $displayedChartFields
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L244 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 244
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L299 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 299
*Type: protected $displayedChartFieldsIndices
*Type: protected $displayedChartFieldsIndices


Line 24: Line 24:
===canView()===
===canView()===
Abstract method that each display is resposbile for implementing.  Checks to see if it can display the given view.
Abstract method that each display is resposbile for implementing.  Checks to see if it can display the given view.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L384 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 384
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L439 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 439
*Signature: protected function canView()
*Signature: protected function canView()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
Line 40: Line 40:
===displayReportControl()===
===displayReportControl()===
Adds any controls for this display to the content node.
Adds any controls for this display to the content node.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L500 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 500
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L555 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 555
*Signature: protected function displayReportControl($contentNode)
*Signature: protected function displayReportControl($contentNode)
*Parameters:
*Parameters:
Line 47: Line 47:
===ensureValidStyleAndType()===
===ensureValidStyleAndType()===
Ensures check we have a valid style and type  set or we can fall back onto one.
Ensures check we have a valid style and type  set or we can fall back onto one.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L397 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 397
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L452 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 452
*Signature: protected function ensureValidStyleAndType($defaultOptions)
*Signature: protected function ensureValidStyleAndType($defaultOptions)
*Parameters:
*Parameters:
Line 54: Line 54:
===getDefaultOptions()===
===getDefaultOptions()===
returns an array of the default display options.  Default options are read and overriddenb in the following order: /modules/CustomReports/displays/$display/display_options /modules/CustomReports/relationships/display_options/$display /modules/CustomReports/reports/display_options/$display /modules/CustomReports/reportViews/$view/display_options/$display Finally any options that have a key in $get are replaced by that value
returns an array of the default display options.  Default options are read and overriddenb in the following order: /modules/CustomReports/displays/$display/display_options /modules/CustomReports/relationships/display_options/$display /modules/CustomReports/reports/display_options/$display /modules/CustomReports/reportViews/$view/display_options/$display Finally any options that have a key in $get are replaced by that value
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L335 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 335
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L390 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 390
*Signature: protected function getDefaultOptions($get,$options)
*Signature: protected function getDefaultOptions($get,$options)
*Parameters:
*Parameters:
Line 62: Line 62:
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===makeChartStylesSane()===
===makeChartStylesSane()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L451 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 451
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L506 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 506
*Signature: protected function makeChartStylesSane($defaultOptions)
*Signature: protected function makeChartStylesSane($defaultOptions)
*Parameters:
*Parameters:
**&$defaultOptions  
**&$defaultOptions  
===postProcessResultsMultiRow()===
===postProcessResultsMultiRow()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L220 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 220
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L275 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 275
*Signature: protected function postProcessResultsMultiRow()
*Signature: protected function postProcessResultsMultiRow()
===postProcessResultsOneRow()===
===postProcessResultsOneRow()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L133 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 133
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L188 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 188
*Signature: protected function postProcessResultsOneRow()
*Signature: protected function postProcessResultsOneRow()
===preProcessResultsMultiRow()===
===preProcessResultsMultiRow()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L214 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 214
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L269 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 269
*Signature: protected function preProcessResultsMultiRow()
*Signature: protected function preProcessResultsMultiRow()
===preProcessResultsOneRow()===
===preProcessResultsOneRow()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L210 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 210
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L265 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 265
*Signature: protected function preProcessResultsOneRow()
*Signature: protected function preProcessResultsOneRow()
===processResultRow()===
===processResultRow()===
Process a result row.
Process a result row.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L253 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 253
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L308 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 308
*Signature: protected function processResultRow($row,$row_num,$contentNode)
*Signature: protected function processResultRow($row,$row_num,$contentNode)
*Parameters:
*Parameters:
Line 92: Line 92:
*Signature: protected function processResults($results_data,$contentNode)
*Signature: protected function processResults($results_data,$contentNode)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $results_data <br/>an array of results.  indices are 'restults' and MDB2 Buffered result and 'num_results' the number of results.  (these values may be false on failure)
** [http://www.php.net/manual/en/language.types.array.php array ] $results_data <br/>an array of results.  indices are 'results' and MDB2 Buffered result and 'num_results' the number of results.  (these values may be false on failure)
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode <br/>Default to null a node to append the results onto
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode <br/>Default to null a node to append the results onto
***Default Value: null
***Default Value: null
===setupFlashChart()===
===setupFlashChart()===
Sets up the flash chart options in $this->chart
Sets up the flash chart options in $this->chart
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L641 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 641
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L696 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 696
*Signature: protected function setupFlashChart($defaultOptions)
*Signature: protected function setupFlashChart($defaultOptions)
*Parameters:
*Parameters:
**&$defaultOptions  
**&$defaultOptions  
*Returns: boolean.<br/>True on success
*Returns: boolean.<br/>True on success
===setupHeightWidth()===
Set up the height or width of the chart rectangle based no the size of the legend for pie and the relevant axis for column/bar/line.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php#L164 i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php] on line 164
*Signature: protected function setupHeightWidth()
==Inherited Methods==
==Inherited Methods==
===__construct()===
===__construct()===

Latest revision as of 08:52, 27 May 2010


This article describes the class I2CE_CustomReport_Display_PieChart .

I2CE_CustomReport_Display_PDF

Variables

$chart

$displayedChartFields

An array with values the name of the columns used for this display

$displayedChartFieldsIndices

An array (or an array or arrays) with keys the values of the charted fields and values the index row (row and col) they are in the $chart['chart_data'] array @var protected array $displayedChartFields

Methods

canView()

Abstract method that each display is resposbile for implementing. Checks to see if it can display the given view.

display()

Display the report

  • Defined in i2ce/modules/CustomReports/modules/PieChart/lib/I2CE_CustomReport_Display_PieChart.php on line 45
  • Signature: public function display($contentNode,$processResults,$controls)
  • Parameters:
    • DOMNode $contentNode
      The DOM node we wish to display into
    • boolean $processResults
      Defaults to true meaning we run through the results
      • Default Value: true
    • mixed $controls
      If null (default), we display all the report controsl. If string or an array of string, we only display the indicated controls
      • Default Value: null
  • Returns: boolean.
    true on sucess

displayReportControl()

Adds any controls for this display to the content node.

ensureValidStyleAndType()

Ensures check we have a valid style and type set or we can fall back onto one.

getDefaultOptions()

returns an array of the default display options. Default options are read and overriddenb in the following order: /modules/CustomReports/displays/$display/display_options /modules/CustomReports/relationships/display_options/$display /modules/CustomReports/reports/display_options/$display /modules/CustomReports/reportViews/$view/display_options/$display Finally any options that have a key in $get are replaced by that value

makeChartStylesSane()

postProcessResultsMultiRow()

postProcessResultsOneRow()

preProcessResultsMultiRow()

preProcessResultsOneRow()

processResultRow()

Process a result row.

processResults()

Process results

setupFlashChart()

Sets up the flash chart options in $this->chart

setupHeightWidth()

Set up the height or width of the chart rectangle based no the size of the legend for pie and the relevant axis for column/bar/line.

Inherited Methods

__construct()

This public method is inherited from I2CE_CustomReport_Display->__construct()

saveDefaultView()

This public method is inherited from I2CE_CustomReport_Display->saveDefaultView()

saveDisplayOptions()

This public method is inherited from I2CE_CustomReport_Display->saveDisplayOptions()

displayMetaInfo()

This protected method is inherited from I2CE_CustomReport_Display->displayMetaInfo()

displayReportControls()

This protected method is inherited from I2CE_CustomReport_Display->displayReportControls()

displayReportLimit()

This protected method is inherited from I2CE_CustomReport_Display->displayReportLimit()

displayReportLimits()

This protected method is inherited from I2CE_CustomReport_Display->displayReportLimits()

findNumericFields()

This protected method is inherited from I2CE_CustomReport_Display->findNumericFields()

getBasePage()

This protected method is inherited from I2CE_CustomReport_Display->getBasePage()

getDisplayFieldsData()

This protected method is inherited from I2CE_CustomReport_Display->getDisplayFieldsData()

getFormFieldObjects()

This protected method is inherited from I2CE_CustomReport_Display->getFormFieldObjects()

getMappedValue()

This protected method is inherited from I2CE_CustomReport_Display->getMappedValue()

getReportViewDisplayedFields()

This protected method is inherited from I2CE_CustomReport_Display->getReportViewDisplayedFields()

getReportViewsFactory()

This protected method is inherited from I2CE_CustomReport_Display->getReportViewsFactory()

getResults()

This protected method is inherited from I2CE_CustomReport_Display->getResults()

getSwissReport()

This protected method is inherited from I2CE_CustomReport_Display->getSwissReport()

getSwissReportFunction()

This protected method is inherited from I2CE_CustomReport_Display->getSwissReportFunction()

getSwissReportView()

This protected method is inherited from I2CE_CustomReport_Display->getSwissReportView()

isMapped()

This protected method is inherited from I2CE_CustomReport_Display->isMapped()

mapReportFormField()

This protected method is inherited from I2CE_CustomReport_Display->mapReportFormField()

mapResults()

This protected method is inherited from I2CE_CustomReport_Display->mapResults()

processWhere()

This protected method is inherited from I2CE_CustomReport_Display->processWhere()

processWhereByField()

This protected method is inherited from I2CE_CustomReport_Display->processWhereByField()

processWhereByFunction()

This protected method is inherited from I2CE_CustomReport_Display->processWhereByFunction()

setupMappedValues()

This protected method is inherited from I2CE_CustomReport_Display->setupMappedValues()

_hasMethod()

This public method is inherited from I2CE_Fuzzy->_hasMethod()

Inherited Variables

$formObjs

Theis protected variable is inherited from I2CE_CustomReport_Display->$formObjs

$mappedFields

Theis protected variable is inherited from I2CE_CustomReport_Display->$mappedFields

$formMaps

Theis protected variable is inherited from I2CE_CustomReport_Display->$formMaps

$fieldMaps

Theis protected variable is inherited from I2CE_CustomReport_Display->$fieldMaps

$mappedValues

Theis protected variable is inherited from I2CE_CustomReport_Display->$mappedValues

$display

Theis protected variable is inherited from I2CE_CustomReport_Display->$display

$reportObj

Theis protected variable is inherited from I2CE_CustomReport_Display->$reportObj

$defaultOptions

Theis protected variable is inherited from I2CE_CustomReport_Display->$defaultOptions

$view

Theis protected variable is inherited from I2CE_CustomReport_Display->$view

$page

Theis protected variable is inherited from I2CE_CustomReport_Display->$page

$template

Theis protected variable is inherited from I2CE_CustomReport_Display->$template

$displayConfig

Theis protected variable is inherited from I2CE_CustomReport_Display->$displayConfig

$config

Theis protected variable is inherited from I2CE_CustomReport_Display->$config

$reportConfig

Theis protected variable is inherited from I2CE_CustomReport_Display->$reportConfig

$relationshipConfig

Theis protected variable is inherited from I2CE_CustomReport_Display->$relationshipConfig

$numeric

Theis protected variable is inherited from I2CE_CustomReport_Display->$numeric

$row_start

Theis protected variable is inherited from I2CE_CustomReport_Display->$row_start

$row_amount

Theis protected variable is inherited from I2CE_CustomReport_Display->$row_amount

$reportViewsFactory

Theis protected variable is inherited from I2CE_CustomReport_Display->$reportViewsFactory

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()