Class: ChartWidget

parasql.widget.ChartWidget

License:
  • https://www.parasql.com/about/license.jsp
Fires:
  • parasql.Event#event:render The ChartWidget 'render' event is fired in response to the underlying chart 'ready' event.
  • parasql.Event#event:click The ChartWidget 'click' event is fired when a user clicks on a chart element which changes the selected row in the underlying DataTable.

Extends

Methods

addEventListener(type, listener)

Adds an event listener to this widget. This can also be done via the Events... option on the tool bar.
Parameters:
Name Type Description
type string A valid event type.
listener string A string containing either the name of a JavaScript function to call, an inline function to be called, or code that resolves to an object which implements a handleEvent(event) method.
Inherited From:
See:
Examples
// add an inline function as an event listener 
parasql.app.getWidgetById('ID1007').addEventListener('render','function (event) { event.target.getContentDiv().innerHTML = "Inline Hello World"; }');
// add a function call as an event listener
parasql.app.getWidgetById('ID1008').addEventListener('render','renderHelloWidget');
// add an object as an event listener; the object must implement handleEvent(event)
document.myClass = new MyClass();
parasql.app.getWidgetById('ID1009').addEventListener('render','document.myClass');

clearSelection()

Clears the current row selection.
Inherited From:

getDataTable() → {parasql.schema.DataTable}

Inherited From:
Returns:
The DataTable containing the data for this object.
Type
parasql.schema.DataTable

getMap() → {google.maps.Map}

You can access the google.maps.Map instance by calling this method.
Since:
  • v69
Returns:
Returns the underlying Map instance if this ChartWidget is a Google Map, otherwise null.
Type
google.maps.Map
Example
myChartWidget.getMap().setZoom(15);

getSelectedRowIndex() → {number}

Since:
  • v60
Inherited From:
Returns:
Returns the index of the currently selected row; if no row is selected returns -1. The first row is 0.
Type
number

getSelectedValue(tableName, columnName) → (nullable) {parasql.schema.DataValue}

Convenience method to return the DataValue in the specified column of the currently selected row.
Parameters:
Name Type Description
tableName string
columnName string
Since:
  • v71
Inherited From:
Throws:
If tableName.columnName does not exist in the underlying DataTable.
Type
TypeError
Returns:
A DataValue object or null if no row is selected.
Type
parasql.schema.DataValue

getTransactionSet() → {parasql.schema.TransactionSet}

Since:
  • v64
Inherited From:
Returns:
Type
parasql.schema.TransactionSet

getWidgetId() → (non-null) {string}

Inherited From:
Returns:
Returns an immutable string that uniquely identifies this widget.
Type
string

redisplay()

Redisplays this widget.
Inherited From:

refreshQuery()

Executes the currently active query filter.
Inherited From:

setSelectedRowIndex(index)

Parameters:
Name Type Description
index number The index of the row to select; the first row is 0. A value of -1 causes no row to be selected.
Since:
  • v60
Inherited From:

toggleDataTableView()

Show/Hide the Data Table behind this ChartWidget.