include/SugarCharts/Jit/JitReports.php
\JitReports
Generic chart
- Parent(s)
- \Jit < \JsChart < \SugarChart
Properties

$base_url= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SugarChart::$$base_url
- Inherited_from
- \JsChart::$$base_url
- Inherited_from
- \Jit::$$base_url

$chartType= ''
- Type
- n/a
- Inherited_from
- \JsChart::$$chartType
- Inherited_from
- \Jit::$$chartType

$chart_properties= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SugarChart::$$chart_properties
- Inherited_from
- \JsChart::$$chart_properties
- Inherited_from
- \Jit::$$chart_properties

$chart_yAxis= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SugarChart::$$chart_yAxis
- Inherited_from
- \JsChart::$$chart_yAxis
- Inherited_from
- \Jit::$$chart_yAxis

$colors_list= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SugarChart::$$colors_list
- Inherited_from
- \JsChart::$$colors_list
- Inherited_from
- \Jit::$$colors_list

$currency_symbol= ''
- Type
- n/a
- Inherited_from
- \SugarChart::$$currency_symbol
- Inherited_from
- \JsChart::$$currency_symbol
- Inherited_from
- \Jit::$$currency_symbol

$data_set= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SugarChart::$$data_set
- Inherited_from
- \JsChart::$$data_set
- Inherited_from
- \Jit::$$data_set

$db= ''
- Type
- n/a
- Inherited_from
- \SugarChart::$$db
- Inherited_from
- \JsChart::$$db
- Inherited_from
- \Jit::$$db

$display_data= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SugarChart::$$display_data
- Inherited_from
- \JsChart::$$display_data
- Inherited_from
- \Jit::$$display_data

$forceHideDataGroupLink= 'false'
falseDetails- Type
- n/a
- Inherited_from
- \SugarChart::$$forceHideDataGroupLink
- Inherited_from
- \JsChart::$$forceHideDataGroupLink
- Inherited_from
- \Jit::$$forceHideDataGroupLink

$group_by= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SugarChart::$$group_by
- Inherited_from
- \JsChart::$$group_by
- Inherited_from
- \Jit::$$group_by

$image_export_type= '""'
""Details- Type
- n/a
- Inherited_from
- \SugarChart::$$image_export_type
- Inherited_from
- \JsChart::$$image_export_type
- Inherited_from
- \Jit::$$image_export_type

$is_currency= ''
- Type
- n/a
- Inherited_from
- \SugarChart::$$is_currency
- Inherited_from
- \JsChart::$$is_currency
- Inherited_from
- \Jit::$$is_currency

$jsonFilename= ''
- Type
- n/a
- Inherited_from
- \JsChart::$$jsonFilename
- Inherited_from
- \Jit::$$jsonFilename

$print_html_legend_pdf= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \Jit::$$print_html_legend_pdf

$super_set= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SugarChart::$$super_set
- Inherited_from
- \JsChart::$$super_set
- Inherited_from
- \Jit::$$super_set

$supports_image_export= 'true'
trueDetails- Type
- n/a
- Inherited_from
- \Jit::$$supports_image_export

$thousands_symbol= ''
- Type
- n/a
- Inherited_from
- \SugarChart::$$thousands_symbol
- Inherited_from
- \JsChart::$$thousands_symbol
- Inherited_from
- \Jit::$$thousands_symbol

$url_params= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SugarChart::$$url_params
- Inherited_from
- \JsChart::$$url_params
- Inherited_from
- \Jit::$$url_params
Methods

calculateGroupByTotal(
$dataset
)
:
void| Name | Type | Description |
|---|---|---|
| $dataset |

calculateSingleBarMax(
$dataset
)
:
void| Name | Type | Description |
|---|---|---|
| $dataset |

calculateTotal(
\group $group_by
)
:
intreturns the total amount value for the group by field
Inherited from: \SugarChart::calculateTotal()\JsChart::calculateTotal()\Jit::calculateTotal()| Name | Type | Description |
|---|---|---|
| $group_by | \group | by field |
| Type | Description |
|---|---|
| int | $total total value |

chartArray(
array $chartsArray
)
:
arraywrapper function to return chart array after any additional processing
Inherited from: \JsChart::chartArray()\Jit::chartArray()| Name | Type | Description |
|---|---|---|
| $chartsArray | array | array of chart config items that need processing |
| Type | Description |
|---|---|
| array | $chartArray after it has been process |

checkYAxis(
\value $value
)
:
\yAxisreturns correct yAxis min/max
Inherited from: \SugarChart::checkYAxis()\JsChart::checkYAxis()\Jit::checkYAxis()| Name | Type | Description |
|---|---|---|
| $value | \value | to check |
| Type | Description |
|---|---|
| \yAxis | min and max |

constructBaseURL(
)
:
void
convertCurrency(
$to_convert
)
:
void| Name | Type | Description |
|---|---|---|
| $to_convert |

display(
string $name, $xmlFile, $width
=
'320', $height
=
'480', $reportChartDivStyle, $resize
=
false
)
:
stringwrapper function to return the html code containing the chart in a div
| Name | Type | Description |
|---|---|---|
| $name | string | name of the div string $xmlFile location of the XML file string $style optional additional styles for the div |
| $xmlFile | ||
| $width | ||
| $height | ||
| $reportChartDivStyle | ||
| $resize |
| Type | Description |
|---|---|
| string | returns the html code through smarty |

formatNumber(
$number, $decimals
=
null, $decimal_point
=
null, $thousands_sep
=
null
)
:
void
| Name | Type | Description |
|---|---|---|
| $number | ||
| $decimals | ||
| $decimal_point | ||
| $thousands_sep |

generateChartStrings(
string $xmlFile
)
:
\nonegenerates xml file for Flash charts to use for internationalized instances
Inherited from: \SugarChart::generateChartStrings()\JsChart::generateChartStrings()\Jit::generateChartStrings()| Name | Type | Description |
|---|---|---|
| $xmlFile | string | location of the XML file to write to |
| Type | Description |
|---|---|
| \none |

generateXML(
$xmlDataName
=
false
)
:
stringfunction to generate XML and return it
Inherited from: \SugarChart::generateXML()\JsChart::generateXML()\Jit::generateXML()| Name | Type | Description |
|---|---|---|
| $xmlDataName | none |
| Type | Description |
|---|---|
| string | $xmlContents with xml information |

getDashletScript(
$id, $xmlFile
=
""
)
:
void| Name | Type | Description |
|---|---|---|
| $id | ||
| $xmlFile |

getXMLFileName(
string $file_id
)
:
voidreturns a name for the XML File
Inherited from: \SugarChart::getXMLFileName()\JsChart::getXMLFileName()\Jit::getXMLFileName()| Name | Type | Description |
|---|---|---|
| $file_id | string |
|

get_image_cache_file_name(
$xmlFile, $ext
=
".png"
)
:
void
| Name | Type | Description |
|---|---|---|
| $xmlFile | ||
| $ext |

isCurrencyReportGroupTotal(
array $dataset
)
:
boolMethod checks is our dataset from currency field or not
| Name | Type | Description |
|---|---|---|
| $dataset | array | of chart |
| Type | Description |
|---|---|
| bool | is currency |

nullGroup(
\$sugarSetValue $superSetValue, \$url $url
)
:
voidnullGroup This function sets a null group by clause
Inherited from: \SugarChart::nullGroup()\JsChart::nullGroup()\Jit::nullGroup()| Name | Type | Description |
|---|---|---|
| $superSetValue | \$sugarSetValue | Mixed value |
| $url | \$url | String value of URL for the link |

processData(
)
:
stringreturns xml data format
Inherited from: \SugarChart::processData()\JsChart::processData()\Jit::processData()| Type | Description |
|---|---|
| string | with xml data format |

processDataGroup(
$tablevel, $title, $value, $label, $link
)
:
void| Name | Type | Description |
|---|---|---|
| $tablevel | ||
| $title | ||
| $value | ||
| $label | ||
| $link |

processGauge(
$position, $target, $phases
=
array()
)
:
void
| Name | Type | Description |
|---|---|---|
| $position | ||
| $target | ||
| $phases |

processReportData(
$dataset, $level
=
1, $first
=
false
)
:
void| Name | Type | Description |
|---|---|---|
| $dataset | ||
| $level | ||
| $first |

saveXMLFile(
string $xmlFilename, $xmlContents
)
:
stringfunction to save XML contents into a file
Inherited from: \SugarChart::saveXMLFile()\JsChart::saveXMLFile()\Jit::saveXMLFile()| Name | Type | Description |
|---|---|---|
| $xmlFilename | string | location of the xml file string $xmlContents contents of the xml file |
| $xmlContents |
| Type | Description |
|---|---|
| string | boolean denoting whether save has failed |

setDisplayProperty(
$property, $value
)
:
void| Name | Type | Description |
|---|---|---|
| $property | ||
| $value |

setProperties(
$title, $subtitle, $type, $legend
=
'on', $labels
=
'value', $print
=
'on', $thousands
=
false
)
:
void| Name | Type | Description |
|---|---|---|
| $title | ||
| $subtitle | ||
| $type | ||
| $legend | ||
| $labels | ||
| $thousands |

sortData(
array $data_set, $keycolname1
=
null, $translate1
=
false, $keycolname2
=
null, $translate2
=
false, $ifsort2
=
false
)
:
\TheThis function is used for localize all the characters in the Chart. And it can also sort all the dom_values by the sequence defined in the dom, but this may produce a lot of extra empty data in the xml file, when the chart is sorted by two key cols.
Inherited from: \SugarChart::sortData()\JsChart::sortData()\Jit::sortData()If the data quantity is large, it maybe a little slow.
| Name | Type | Description |
|---|---|---|
| $data_set | array | The data get from database string $keycolname1 We will sort by this key first bool $translate1 Whether to trabslate the first column string $keycolname1 We will sort by this key secondly, and it can be null, then it will only sort by the first column. bool $translate1 Whether to trabslate the second column bool $ifsort2 Whether to sort by the second column or just translate the second column. |
| $keycolname1 | ||
| $translate1 | ||
| $keycolname2 | ||
| $translate2 | ||
| $ifsort2 |
| Type | Description |
|---|---|
| \The | sorted and translated data. |

tab(
string $str, $depth
)
:
string
| Name | Type | Description |
|---|---|---|
| $str | string | input string int $depth number of times to tab |
| $depth |
| Type | Description |
|---|---|
| string | with tabs appended before it |

tabValue(
$tag, $value, $depth
)
:
stringreturns text with tabs appended before it
Inherited from: \SugarChart::tabValue()\JsChart::tabValue()\Jit::tabValue()| Name | Type | Description |
|---|---|---|
| $tag | ||
| $value | ||
| $depth |
| Type | Description |
|---|---|
| string | with tabs appended before it |

xmlDataBarChart(
)
:
void
xmlDataForGaugeChart(
)
:
void
xmlDataForGroupByChart(
)
:
void
xmlDataGenericChart(
)
:
void
xmlFooter(
)
:
stringreturns the footer for the constructed xml file for sugarcharts
Inherited from: \SugarChart::xmlFooter()\JsChart::xmlFooter()\Jit::xmlFooter()| Type | Description |
|---|---|
| string | $footer XML footer |

xmlHeader(
)
:
stringreturns the header for the constructed xml file for sugarcharts
Inherited from: \SugarChart::xmlHeader()\JsChart::xmlHeader()\Jit::xmlHeader()| Type | Description |
|---|---|
| string | $header XML header |

xmlProperties(
)
:
stringreturns the properties tag for the constructed xml file for sugarcharts
Inherited from: \SugarChart::xmlProperties()\JsChart::xmlProperties()\Jit::xmlProperties()| Type | Description |
|---|---|
| string | $properties XML properties tag |

xmlYAxis(
)
:
stringreturns the y-axis values for the chart
Inherited from: \SugarChart::xmlYAxis()\JsChart::xmlYAxis()\Jit::xmlYAxis()| Type | Description |
|---|---|
| string | $yAxis XML yAxis tag |