include/SugarCharts/Jit/Jit.php

Show: inherited
Table of Contents

\Jit

Package:

Generic chart

Parent(s)
\JsChart < \SugarChart
Children
\JitReports

Properties

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

Methods

methodpublic__construct( ) : void

methodpublicbuildChartColors( ) : void
inherited

Inherited from: \JsChart::buildChartColors()
methodpublicbuildDataBarChart(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildDataBarChart()
Parameters
Name Type Description
$xmlstr
methodpublicbuildDataBarChartGrouped(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildDataBarChartGrouped()
Parameters
Name Type Description
$xmlstr
methodpublicbuildDataBarChartStacked(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildDataBarChartStacked()
Parameters
Name Type Description
$xmlstr
methodpublicbuildDataGaugeChart(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildDataGaugeChart()
Parameters
Name Type Description
$xmlstr
methodpublicbuildDataPieChart(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildDataPieChart()
Parameters
Name Type Description
$xmlstr
methodpublicbuildHTMLLegend(  $xmlFile ) : void
inherited

Inherited from: \JsChart::buildHTMLLegend()
Parameters
Name Type Description
$xmlFile
methodpublicbuildJson(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildJson()
Parameters
Name Type Description
$xmlstr
methodpublicbuildLabelsBarChart(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildLabelsBarChart()
Parameters
Name Type Description
$xmlstr
methodpublicbuildLabelsBarChartStacked(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildLabelsBarChartStacked()
Parameters
Name Type Description
$xmlstr
methodpublicbuildLabelsGaugeChart(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildLabelsGaugeChart()
Parameters
Name Type Description
$xmlstr
methodpublicbuildLabelsPieChart(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildLabelsPieChart()
Parameters
Name Type Description
$xmlstr
methodpublicbuildProperties(  $xmlstr ) : void
inherited

Inherited from: \JsChart::buildProperties()
Parameters
Name Type Description
$xmlstr
methodpubliccalculateGroupByTotal(  $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()
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()
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()
Parameters
Name Type Description
$xmlstr
methodpubliccheckYAxis( \value $value ) : \yAxis
inherited

returns correct yAxis min/max

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

to check

Returns
Type Description
\yAxis min and max
methodpublicconstructBaseURL( ) : void
methodpublicconstructURL( ) : void
methodpublicconvertCurrency(  $to_convert ) : void
Parameters
Name Type Description
$to_convert
methodpublicdisplay( string $name,  $xmlFile,  $width = '320',  $height = '480',  $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
$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()
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()
Parameters
Name Type Description
$xmlDataName

none

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

Inherited from: \JsChart::getChartConfigParams()
Parameters
Name Type Description
$xmlStr
methodpublicgetChartDimensions(  $xmlStr ) : void
inherited

Inherited from: \JsChart::getChartDimensions()
Parameters
Name Type Description
$xmlStr
methodpublicgetChartResources( ) : void

methodpublicgetConfigProperties( ) : void
inherited

Inherited from: \JsChart::getConfigProperties()
methodpublicgetDashletScript(  $id,  $xmlFile = "" ) : void

Parameters
Name Type Description
$id
$xmlFile
methodpublicgetData(  $query ) : void
inherited

Inherited from: \SugarChart::getData()\JsChart::getData()
Parameters
Name Type Description
$query
methodpublicgetMySugarChartResources( ) : void

methodpublicgetNumNodes(  $xmlstr ) : void
inherited

Inherited from: \JsChart::getNumNodes()
Parameters
Name Type Description
$xmlstr
methodpublicgetTotal( ) : void
methodpublicgetXMLChartProperties(  $xmlStr ) : void
inherited

Inherited from: \JsChart::getXMLChartProperties()
Parameters
Name Type Description
$xmlStr
methodpublicgetXMLFileName( string $file_id ) : void
staticinherited

returns a name for the XML File

Inherited from: \SugarChart::getXMLFileName()\JsChart::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
inherited

Inherited from: \JsChart::get_image_cache_file_name()
Parameters
Name Type Description
$xmlFile
$ext
methodpublicisSupported(  $chartType ) : void
inherited

Inherited from: \JsChart::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()
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()
Returns
Type Description
string with xml data format
methodpublicprocessDataGroup(  $tablevel,  $title,  $value,  $label,  $link ) : void
Parameters
Name Type Description
$tablevel
$title
$value
$label
$link
methodpublicprocessSpecialChars(  $str ) : void
inherited

Inherited from: \JsChart::processSpecialChars()
Parameters
Name Type Description
$str
methodpublicprocessXML(  $xmlFile ) : void
inherited

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

Inherited from: \JsChart::saveJsonFile()
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()
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
inherited

Inherited from: \SugarChart::setData()\JsChart::setData()
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()

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()
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()
Parameters
Name Type Description
$tag
$value
$depth
Returns
Type Description
string with tabs appended before it
methodpublicxmlData( ) : void
inherited

Inherited from: \SugarChart::xmlData()\JsChart::xmlData()
methodpublicxmlDataBarChart( ) : void
methodpublicxmlDataForGaugeChart( ) : void
methodpublicxmlDataForGroupByChart( ) : void
methodpublicxmlDataGenericChart( ) : void
methodpublicxmlFooter( ) : string
inherited

returns the footer for the constructed xml file for sugarcharts

Inherited from: \SugarChart::xmlFooter()\JsChart::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()
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()
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()
Returns
Type Description
string $yAxis XML yAxis tag
Documentation was generated by DocBlox 0.18.1.