ChartFactory
class ChartFactory extends JavascriptFactory (View source)
ChartFactory Class
This class takes Charts and uses all of 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.
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.
Creates a new ChartFactory with the javascript template.
Details
in
JavascriptFactory at line 91
boolean
coreJsRendered()
Returns true|false depending on if the jsapi & lava.js core have been added to the output.
in
JavascriptFactory at line 102
string
getCoreJs()
Gets the Google chart api and lava.js core.
in
JavascriptFactory at line 120
string
getJavascript()
Parses the javascript template and wraps the output in a script tag.
in
JavascriptFactory at line 136
string
getChartJs(
Chart $chart,
ElementId $elementId)
Checks for an element id to output the chart into and builds the Javascript.
in
JavascriptFactory at line 151
string
getDashboardJs(
Dashboard $dashboard,
ElementId $elementId)
Checks for an element id to output the chart into and builds the Javascript.
at line 41
__construct(
Chart $chart,
ElementId $elementId)
Creates a new ChartFactory with the javascript template.