Class: Canvas

Oracle.BDD.Portlets.Visualization.Model. Canvas

new Canvas()

Do NOT instantiate this class directly. The canvas object should be acquired through the Oracle.BDD.Portlets.Visualization.Renderers.BaseRenderer#getCanvas function ONLY.
Source:

Methods

clear()

Clears the canvas of all child elements.
Source:

getHeight() → {Number}

Returns the height in pixels of the configured canvas height minus the top and bottom margins. This is the "working" height of the canvas.
Source:
Returns:
Canvas height
Type
Number

getMargins() → {Object}

Returns the margins of the canvas as { top: 50, bottom: 50, right: 50, left: 50}
Source:
Returns:
Margins of the canvas
Type
Object

getRoot(clear) → {Object}

Returns the canvas as a DOM node. This is the root element onto which the visualization is to be rendered. If a tagName was specified in the configuration, an element of that tagName will be returned, otherwise a \ container element wrapped in an \ element will be returned. Note that this function returns a blank node only when the visualization has not yet been rendered or the clear parameter is true, otherwise the node will be the root element of the existing visualization's canvas.
Parameters:
Name Type Description
clear boolean Indicates if the existing canvas content should be cleared
Source:
Returns:
The canvas as a DOM Node
Type
Object

getRootId() → {string}

Returns the canvas root element's id
Source:
Returns:
The root element's id
Type
string

getWidth() → {Number}

Returns the width in pixels of the configured canvas width minus the left and right margins. This is the "working" width of the canvas.
Source:
Returns:
Canvas width
Type
Number

isRendered() → {boolean}

Returns a boolean indicating if the canvas contains any content.
Source:
Returns:
Type
boolean