JavascriptFactory
class JavascriptFactory (View source)
JavascriptFactory Class
This class takes charts and uses all the info to build the complete javascript blocks for outputting into the page.
Constants
| JS_OPEN | 
                     Opening javascript tag. 
  | 
            
| JS_CLOSE | 
                     Closing javascript tag. 
  | 
            
| JSAPI | 
                     Script block for the Google's Chart API. 
  | 
            
Methods
Returns true|false depending on if the jsapi & lava.js core have been added to the output.
Gets the Google chart api and lava.js core.
Parses the javascript template and wraps the output in a script tag.
Checks for an element id to output the chart into and builds the Javascript.
Checks for an element id to output the chart into and builds the Javascript.
Details
        at line 91
                            
    boolean
    coreJsRendered()
    
    Returns true|false depending on if the jsapi & lava.js core have been added to the output.
        at line 102
                            
    string
    getCoreJs()
    
    Gets the Google chart api and lava.js core.
        at line 120
                            
    string
    getJavascript()
    
    Parses the javascript template and wraps the output in a script tag.
        at line 136
                            
    string
    getChartJs(
    Chart $chart, 
    ElementId $elementId)
    
    Checks for an element id to output the chart into and builds the Javascript.
        at line 151
                            
    string
    getDashboardJs(
    Dashboard $dashboard, 
    ElementId $elementId)
    
    Checks for an element id to output the chart into and builds the Javascript.