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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$xmlFile= ''
- Type
- n/a
- Inherited_from
- \JsChart::$$xmlFile
Methods

buildDataBarChart(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

buildDataBarChartGrouped(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

buildDataBarChartStacked(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

buildDataGaugeChart(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

buildDataPieChart(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

buildHTMLLegend(
$xmlFile
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlFile |

buildJson(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

buildLabelsBarChart(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

buildLabelsBarChartStacked(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

buildLabelsGaugeChart(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

buildLabelsPieChart(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

buildProperties(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

calculateTotal(
\group $group_by
)
:
intreturns the total amount value for the group by field
Inherited from: \SugarChart::calculateTotal()\JsChart::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()| Name | Type | Description |
|---|---|---|
| $chartsArray | array | array of chart config items that need processing |
| Type | Description |
|---|---|
| array | $chartArray after it has been process |

checkData(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

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

display(
string $name, $xmlFile, $width
=
'320', $height
=
'480', $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 | ||
| $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()| 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()| Name | Type | Description |
|---|---|---|
| $xmlDataName | none |
| Type | Description |
|---|---|
| string | $xmlContents with xml information |

getChartConfigParams(
$xmlStr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlStr |

getChartDimensions(
$xmlStr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlStr |

getNumNodes(
$xmlstr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlstr |

getXMLChartProperties(
$xmlStr
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlStr |

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

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

isSupported(
$chartType
)
:
void| Name | Type | Description |
|---|---|---|
| $chartType |

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

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 |

processSpecialChars(
$str
)
:
void| Name | Type | Description |
|---|---|---|
| $str |

processXML(
$xmlFile
)
:
void| Name | Type | Description |
|---|---|---|
| $xmlFile |

saveJsonFile(
$jsonContents
)
:
void| Name | Type | Description |
|---|---|---|
| $jsonContents |

saveXMLFile(
string $xmlFilename, $xmlContents
)
:
stringfunction to save XML contents into a file
Inherited from: \SugarChart::saveXMLFile()\JsChart::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 |

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()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()| Name | Type | Description |
|---|---|---|
| $tag | ||
| $value | ||
| $depth |
| Type | Description |
|---|---|
| string | with tabs appended before it |

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

xmlHeader(
)
:
stringreturns the header for the constructed xml file for sugarcharts
Inherited from: \SugarChart::xmlHeader()\JsChart::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()| Type | Description |
|---|---|
| string | $properties XML properties tag |

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