include/SugarCharts/Jit/JitReports.php

Show: inherited
Table of Contents

\JitReports

Package:

Generic chart

Parent(s)
\Jit < \JsChart < \SugarChart

Properties

Propertypublic  $base_url= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarChart::$$base_url  
Inherited_from
\JsChart::$$base_url  
Inherited_from
\Jit::$$base_url  
Propertypublic  $chartId= ''
inheritedInherited from: \JsChart::$$chartId\Jit::$$chartId
Details
Type
n/a
Inherited_from
\JsChart::$$chartId  
Inherited_from
\Jit::$$chartId  
Propertypublic  $chartType= ''
inheritedInherited from: \JsChart::$$chartType\Jit::$$chartType
Details
Type
n/a
Inherited_from
\JsChart::$$chartType  
Inherited_from
\Jit::$$chartType  
Propertypublic  $chart_properties= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarChart::$$chart_properties  
Inherited_from
\JsChart::$$chart_properties  
Inherited_from
\Jit::$$chart_properties  
Propertypublic  $chart_yAxis= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarChart::$$chart_yAxis  
Inherited_from
\JsChart::$$chart_yAxis  
Inherited_from
\Jit::$$chart_yAxis  
Propertypublic  $colors_list= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarChart::$$colors_list  
Inherited_from
\JsChart::$$colors_list  
Inherited_from
\Jit::$$colors_list  
Propertypublic  $currency_symbol= ''
Details
Type
n/a
Inherited_from
\SugarChart::$$currency_symbol  
Inherited_from
\JsChart::$$currency_symbol  
Inherited_from
\Jit::$$currency_symbol  
Propertypublic  $data_set= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarChart::$$data_set  
Inherited_from
\JsChart::$$data_set  
Inherited_from
\Jit::$$data_set  
Propertyprivate  $db= ''
Details
Type
n/a
Inherited_from
\SugarChart::$$db  
Inherited_from
\JsChart::$$db  
Inherited_from
\Jit::$$db  
Propertypublic  $display_data= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarChart::$$display_data  
Inherited_from
\JsChart::$$display_data  
Inherited_from
\Jit::$$display_data  
Propertypublic  $forceHideDataGroupLink= 'false'
Default valuefalseDetails
Type
n/a
Inherited_from
\SugarChart::$$forceHideDataGroupLink  
Inherited_from
\JsChart::$$forceHideDataGroupLink  
Inherited_from
\Jit::$$forceHideDataGroupLink  
Propertypublic  $group_by= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarChart::$$group_by  
Inherited_from
\JsChart::$$group_by  
Inherited_from
\Jit::$$group_by  
Propertypublic  $height= ''
inheritedInherited from: \JsChart::$$height\Jit::$$height
Details
Type
n/a
Inherited_from
\JsChart::$$height  
Inherited_from
\Jit::$$height  
Propertypublic  $image_export_type= '""'
Default value""Details
Type
n/a
Inherited_from
\SugarChart::$$image_export_type  
Inherited_from
\JsChart::$$image_export_type  
Inherited_from
\Jit::$$image_export_type  
Propertypublic  $is_currency= ''
Details
Type
n/a
Inherited_from
\SugarChart::$$is_currency  
Inherited_from
\JsChart::$$is_currency  
Inherited_from
\Jit::$$is_currency  
Propertypublic  $jsonFilename= ''
Details
Type
n/a
Inherited_from
\JsChart::$$jsonFilename  
Inherited_from
\Jit::$$jsonFilename  
Propertypublic  $print_html_legend_pdf= 'true'
inheritedInherited from: \Jit::$$print_html_legend_pdf
Default valuetrueDetails
Type
n/a
Inherited_from
\Jit::$$print_html_legend_pdf  
Propertyprivate  $processed_report_keys= 'array()'
Default valuearray()Details
Type
n/a
Propertyprotected  $ss= ''
inheritedInherited from: \JsChart::$$ss\Jit::$$ss
Details
Type
n/a
Inherited_from
\JsChart::$$ss  
Inherited_from
\Jit::$$ss  
Propertypublic  $super_set= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarChart::$$super_set  
Inherited_from
\JsChart::$$super_set  
Inherited_from
\Jit::$$super_set  
Propertypublic  $supports_image_export= 'true'
inheritedInherited from: \Jit::$$supports_image_export
Default valuetrueDetails
Type
n/a
Inherited_from
\Jit::$$supports_image_export  
Propertypublic  $thousands_symbol= ''
Details
Type
n/a
Inherited_from
\SugarChart::$$thousands_symbol  
Inherited_from
\JsChart::$$thousands_symbol  
Inherited_from
\Jit::$$thousands_symbol  
Propertypublic  $url_params= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarChart::$$url_params  
Inherited_from
\JsChart::$$url_params  
Inherited_from
\Jit::$$url_params  
Propertypublic  $width= ''
inheritedInherited from: \JsChart::$$width\Jit::$$width
Details
Type
n/a
Inherited_from
\JsChart::$$width  
Inherited_from
\Jit::$$width  
Propertypublic  $xmlFile= ''
inheritedInherited from: \JsChart::$$xmlFile\Jit::$$xmlFile
Details
Type
n/a
Inherited_from
\JsChart::$$xmlFile  
Inherited_from
\Jit::$$xmlFile  

Methods

methodpublic__construct( ) : void

methodpublicbuildChartColors( ) : void
methodpublicbuildDataBarChart(  $xmlstr ) : void
Parameters
Name Type Description
$xmlstr
methodpublicbuildDataBarChartGrouped(  $xmlstr ) : void
Parameters
Name Type Description
$xmlstr
methodpublicbuildDataBarChartStacked(  $xmlstr ) : void
Parameters
Name Type Description
$xmlstr
methodpublicbuildDataGaugeChart(  $xmlstr ) : void
Parameters
Name Type Description
$xmlstr
methodpublicbuildDataPieChart(  $xmlstr ) : void
Parameters
Name Type Description
$xmlstr
methodpublicbuildHTMLLegend(  $xmlFile ) : void
Parameters
Name Type Description
$xmlFile
methodpublicbuildJson(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildJson()\Jit::buildJson()
Parameters
Name Type Description
$xmlstr
methodpublicbuildLabelsBarChart(  $xmlstr ) : void
Parameters
Name Type Description
$xmlstr
methodpublicbuildLabelsBarChartStacked(  $xmlstr ) : void
Parameters
Name Type Description
$xmlstr
methodpublicbuildLabelsGaugeChart(  $xmlstr ) : void
Parameters
Name Type Description
$xmlstr
methodpublicbuildLabelsPieChart(  $xmlstr ) : void
Parameters
Name Type Description
$xmlstr
methodpublicbuildProperties(  $xmlstr ) : void
Parameters
Name Type Description
$xmlstr
methodpubliccalculateGroupByTotal(  $dataset ) : void
Parameters
Name Type Description
$dataset
methodpubliccalculateReportGroupTotal(  $dataset ) : void

Parameters
Name Type Description
$dataset
methodpubliccalculateSingleBarMax(  $dataset ) : void
Parameters
Name Type Description
$dataset
methodpubliccalculateTotal( \group $group_by ) : int
inherited

returns the total amount value for the group by field

Inherited from: \SugarChart::calculateTotal()\JsChart::calculateTotal()\Jit::calculateTotal()
Parameters
Name Type Description
$group_by \group

by field

Returns
Type Description
int $total total value
methodpublicchartArray( array $chartsArray ) : array
inherited

wrapper function to return chart array after any additional processing

Inherited from: \JsChart::chartArray()\Jit::chartArray()
Parameters
Name Type Description
$chartsArray array

array of chart config items that need processing

Returns
Type Description
array $chartArray after it has been process
methodpubliccheckData(  $xmlstr ) : void
inherited

Inherited from: \JsChart::checkData()\Jit::checkData()
Parameters
Name Type Description
$xmlstr
methodpubliccheckYAxis( \value $value ) : \yAxis
inherited

returns correct yAxis min/max

Inherited from: \SugarChart::checkYAxis()\JsChart::checkYAxis()\Jit::checkYAxis()
Parameters
Name Type Description
$value \value

to check

Returns
Type Description
\yAxis min and max
methodpublicconstructURL( ) : void
methodpublicconvertCurrency(  $to_convert ) : void
Parameters
Name Type Description
$to_convert
methodpublicdisplay( string $name,  $xmlFile,  $width = '320',  $height = '480',  $reportChartDivStyle,  $resize = false ) : string

wrapper function to return the html code containing the chart in a div

Parameters
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
Returns
Type Description
string returns the html code through smarty
methodpublicformatNumber(  $number,  $decimals = null,  $decimal_point = null,  $thousands_sep = null ) : void
Parameters
Name Type Description
$number
$decimals
$decimal_point
$thousands_sep
methodpublicgenerateChartStrings( string $xmlFile ) : \none
inherited

generates xml file for Flash charts to use for internationalized instances

Inherited from: \SugarChart::generateChartStrings()\JsChart::generateChartStrings()\Jit::generateChartStrings()
Parameters
Name Type Description
$xmlFile string

location of the XML file to write to

Returns
Type Description
\none
methodpublicgenerateXML(  $xmlDataName = false ) : string
inherited

function to generate XML and return it

Inherited from: \SugarChart::generateXML()\JsChart::generateXML()\Jit::generateXML()
Parameters
Name Type Description
$xmlDataName

none

Returns
Type Description
string $xmlContents with xml information
methodpublicgetChartConfigParams(  $xmlStr ) : void
Parameters
Name Type Description
$xmlStr
methodpublicgetChartDimensions(  $xmlStr ) : void
Parameters
Name Type Description
$xmlStr
methodpublicgetChartResources( ) : void
inherited

Inherited from: \Jit::getChartResources()
methodpublicgetConfigProperties( ) : void
methodpublicgetDashletScript(  $id,  $xmlFile = "" ) : void
inherited

Inherited from: \Jit::getDashletScript()
Parameters
Name Type Description
$id
$xmlFile
methodpublicgetData(  $query ) : void
Parameters
Name Type Description
$query
methodpublicgetMySugarChartResources( ) : void
inherited

Inherited from: \Jit::getMySugarChartResources()
methodpublicgetNumNodes(  $xmlstr ) : void
inherited

Inherited from: \JsChart::getNumNodes()\Jit::getNumNodes()
Parameters
Name Type Description
$xmlstr
methodpublicgetTotal( ) : void
methodpublicgetXMLChartProperties(  $xmlStr ) : void
Parameters
Name Type Description
$xmlStr
methodpublicgetXMLFileName( string $file_id ) : void
staticinherited

returns a name for the XML File

Inherited from: \SugarChart::getXMLFileName()\JsChart::getXMLFileName()\Jit::getXMLFileName()
Parameters
Name Type Description
$file_id string
  • unique id to make part of the file name
methodpublicget_image_cache_file_name(  $xmlFile,  $ext = ".png" ) : void
Parameters
Name Type Description
$xmlFile
$ext
methodpublicisCurrencyReportGroupTotal( array $dataset ) : bool

Method checks is our dataset from currency field or not

Parameters
Name Type Description
$dataset array

of chart

Returns
Type Description
bool is currency
methodpublicisSupported(  $chartType ) : void
inherited

Inherited from: \JsChart::isSupported()\Jit::isSupported()
Parameters
Name Type Description
$chartType
methodprivatenullGroup( \$sugarSetValue $superSetValue, \$url $url ) : void
inherited

nullGroup This function sets a null group by clause

Inherited from: \SugarChart::nullGroup()\JsChart::nullGroup()\Jit::nullGroup()
Parameters
Name Type Description
$superSetValue \$sugarSetValue

Mixed value

$url \$url

String value of URL for the link

methodpublicprocessData( ) : string
inherited

returns xml data format

Inherited from: \SugarChart::processData()\JsChart::processData()\Jit::processData()
Returns
Type Description
string with xml data format
methodpublicprocessDataGroup(  $tablevel,  $title,  $value,  $label,  $link ) : void
Parameters
Name Type Description
$tablevel
$title
$value
$label
$link
methodpublicprocessReportData(  $dataset,  $level = 1,  $first = false ) : void

Parameters
Name Type Description
$dataset
$level
$first
methodpublicprocessReportGroup(  $dataset ) : void

Parameters
Name Type Description
$dataset
methodpublicprocessSpecialChars(  $str ) : void
Parameters
Name Type Description
$str
methodpublicprocessXML(  $xmlFile ) : void
inherited

Inherited from: \JsChart::processXML()\Jit::processXML()
Parameters
Name Type Description
$xmlFile
methodpublicprocessXmlData( ) : void

methodpublicsaveJsonFile(  $jsonContents ) : void
Parameters
Name Type Description
$jsonContents
methodpublicsaveXMLFile( string $xmlFilename,  $xmlContents ) : string
inherited

function to save XML contents into a file

Inherited from: \SugarChart::saveXMLFile()\JsChart::saveXMLFile()\Jit::saveXMLFile()
Parameters
Name Type Description
$xmlFilename string

location of the xml file string $xmlContents contents of the xml file

$xmlContents
Returns
Type Description
string boolean denoting whether save has failed
methodpublicsetColors(  $colors = array() ) : void
Parameters
Name Type Description
$colors
methodpublicsetData(  $dataSet ) : void
Parameters
Name Type Description
$dataSet
methodpublicsetDisplayProperty(  $property,  $value ) : void
Parameters
Name Type Description
$property
$value
methodpublicsetProperties(  $title,  $subtitle,  $type,  $legend = 'on',  $labels = 'value',  $print = 'on',  $thousands = false ) : void
Parameters
Name Type Description
$title
$subtitle
$type
$legend
$labels
$print
$thousands
methodpublicsortData( array $data_set,  $keycolname1 = null,  $translate1 = false,  $keycolname2 = null,  $translate2 = false,  $ifsort2 = false ) : \The
inherited

This 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.

Parameters
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
Returns
Type Description
\The sorted and translated data.
methodpublictab( string $str,  $depth ) : string
inherited

returns text with tabs appended before it

Inherited from: \JsChart::tab()\Jit::tab()
Parameters
Name Type Description
$str string

input string int $depth number of times to tab

$depth
Returns
Type Description
string with tabs appended before it
methodpublictabValue(  $tag,  $value,  $depth ) : string
inherited

returns text with tabs appended before it

Inherited from: \SugarChart::tabValue()\JsChart::tabValue()\Jit::tabValue()
Parameters
Name Type Description
$tag
$value
$depth
Returns
Type Description
string with tabs appended before it
methodpublicxmlData( ) : void
methodpublicxmlDataBarChart( ) : void
methodpublicxmlDataReportChart( ) : void

methodpublicxmlDataReportSingleValue( ) : void

methodpublicxmlFooter( ) : string
inherited

returns the footer for the constructed xml file for sugarcharts

Inherited from: \SugarChart::xmlFooter()\JsChart::xmlFooter()\Jit::xmlFooter()
Returns
Type Description
string $footer XML footer
methodpublicxmlHeader( ) : string
inherited

returns the header for the constructed xml file for sugarcharts

Inherited from: \SugarChart::xmlHeader()\JsChart::xmlHeader()\Jit::xmlHeader()
Returns
Type Description
string $header XML header
methodpublicxmlProperties( ) : string
inherited

returns the properties tag for the constructed xml file for sugarcharts

Inherited from: \SugarChart::xmlProperties()\JsChart::xmlProperties()\Jit::xmlProperties()
Returns
Type Description
string $properties XML properties tag
methodpublicxmlYAxis( ) : string
inherited

returns the y-axis values for the chart

Inherited from: \SugarChart::xmlYAxis()\JsChart::xmlYAxis()\Jit::xmlYAxis()
Returns
Type Description
string $yAxis XML yAxis tag
Documentation was generated by DocBlox 0.18.1.