Custom Visualizations
Visualizations in Pentaho Analyzer are rendered on the client and are JavaScript based.
You must define a constructor and two key functions in the visualization JavaScript class so that Pentaho Analyzer can render it properly. The constructor of the visualization class will be passed in an HTML element, which acts as the parent node of your visualization.
The first function is resize(width,height)
. The resize function is called every time the visualization renders as a different size, and allows the visualization to adjust calculations.
The second function is draw(datView, vizOptions)
. This function is called when rendering the visualization. The dataView
object contains a multi-dimensional result set returned from the server, and the vizOptions
object contains any customized options specified by the user when configuring the visualization.