Defines the dashboard's attributes, including layout, contained widgets, and filters.
Method | Arguments | Return Value | Description |
---|---|---|---|
refresh() | promise | Refreshes the dashboard. | |
addWidget(widget) | widget (widget) Widget model to be added. | Adds the defined widget to the dashboard. The widget is placed at the bottom of the first column in the dashboard. | |
addWidget(widget, layout) | widget (widget) Widget model to add. | Adds the given widget to the dashboard using the given layout definition. | |
datasources() | Returns an array of datasource objects used by the various widgets in the dashboard. | ||
isEmpty() | boolean | Returns a response stating whether the dashboard includes widgets, or is empty. | |
destroy() | Releases the resources of the dashboard object and contained widgets. |
Property . | Type . | Description |
---|---|---|
filters | Returns the dashboard's fields object. | |
widgets | Returns the dashboard's widgets collection. | |
layout | Returns the dashboard's layout object. | |
style | Returns the dashboard's style object. | |
initialized | boolean | Indicates if the dashboard was initialized. |
refreshing | boolean | Indicates if the dashboard is refreshing. |
editing | boolean | Indicates if the dashboard is currently in edit state. |
Event | Event Arguments | Description |
---|---|---|
initialized | dashboard (dashboard) Dashboard instance. | Fired after the dashboard is initialized. |
refreshstart | dashboard (dashboard) Dashboard instance. | Fired after one or more widgets have started the refresh process. |
refreshend | dashboard (dashboard) Dashboard instance. | Fired when a refresh process ends for one or more widgets. |
widgetrefreshed | dashboard (dashboard) Dashboard instance. | Fired when a widget refresh has ended. |
widgetadded | dashboard (dashboard) Dashboard instance. | Fired when a widget was added to the dashboard. |
stylechanged | dashboard (dashboard) Dashboard instance. | Fired when the dashboard style is changed. |
destroyed | dashboard (dashboard) Dashboard instance. | Fired when the dashboard is destroyed. |
editstart | dashboard (dashboard) Dashboard instance. | Fired when entering edit mode. |
editend | dashboard (dashboard) Dashboard instance. | Fired when in edit mode. |
filterschanged | dashboard (dashboard) Dashboard instance. | Fired when the dashboard filter changes. |
widgetinitialized | widget ( widget) Widget instance. | Fired when the widget is initialized. |
widgetbuildquery | widget ( widget) Widget instance. | Fired when executing the widget’s native build query, and allows customization of the JAQL query object before execution. |
widgetbeforequery | widget ( widget)Widget instance. | Fired before the query is executed. |
widgetprocessresult | widget (widget) Widget instance. | Fired after executing the widget’s native result processing, and allows customization of the query result before being rendered. |
widgetrender | widget (widget) Widget instance. | Fired when the widget is rendered. |
widgetready | widget (widget) Widget instance. | Fired when the widget’s rendering is complete and the widget is ready. |
beforewidgetmenu | widget (widget) Widget instance. | Fired before a widget shown in a dashboard shows it’s context menu. |
widgetdestroyed | widget (widget) Widget instance. | Fired when the widget is destroyed and it’s resources are released. |
Defines filters for dashboards.
Method | Argument | Return Value | Description |
---|---|---|---|
item | index (integer) Index to fetch by. | Returns the JAQL filter object by the given index. | |
item | dimension (string) dimensionality | Returns the JAQL filter object by the given dimension and level. | |
update | filter (jaql) JAQL filter object. | - | Adds or updates the filter object matching the dimensions and level of the given filter. |
remove | index (integer) Index to fetch by. | - | Removes the filter item at the given index. |
remove | dimension (string) dimensionality | - | Removes the filter item by the given dimension and level. |
reset | filters ( [jaql] ) filters with which to reset the collection | - | Removes all filters and resets the filters collection with the given filters array. |
clear | - | - | Removes all items from the filters collection. |
Property | Type | Description |
---|---|---|
length | (integer) | Returns the length of the dashboard filters collection. |
Returns widget details.
Method | Arguments | Return Value | Description |
---|---|---|---|
get | index (integer) Index to fetch by. | Returns the widget by the given index. | |
get | id (string) Widget ID. | Returns the widget by the given ID. | |
toArray | [widget] | Returns an array containing all widgets in the collection. |
Property | Type | Description |
---|---|---|
length | (integer) | Returns the length of the widgets collection. |
Defines the layout options for contained widgets in a dashboard.
Method | Arguments | Return Value | Description |
---|---|---|---|
$$get | widget (widget) Widget to get layout object by. | Returns the widget layout object defined for the widget. |
Property | Type | Description |
---|---|---|
columns | [column] | Returns the column objects array. |
Defines style attributes of the dashboard including widget layouts and colors.
Method | Arguments | Return Value | Description |
---|---|---|---|
palette | - | [string] | Returns a hexadecimal colors array representing the dashboard palette. |
minColor | - | string | Returns the color to be used for a color range min value. |
maxColor | - | string | Returns the color to be used for a color range max value. |
setPalette | array OR palette object, bool | - | Sets the current palette of the dashboard. Accepts either an array of colors or a palette object. Receives a Boolean parameter that indicates whether the existing widget colors (only single colors, not range / conditional) should be reset to the new palette. |
Represents a column in a dashboard.
Properties | Type | Description |
---|---|---|
width | integer | The width as a percentage for the containing dashboard. |
cells | [cell] | The nested cells array. |
index | integer | The column index. |
Represents a cell in a column.
Property | Type | Description |
---|---|---|
subcells | [subcell] | The nested sub-cells array. |
Represents a sub cell in a cell.
Property | Type | Description |
---|---|---|
elements | [element] | Nested elements array. |
width | integer | The width as a percentage of the containing cell. |
index | integer | The index of the sub-cells in it's parent cell's sub-cells array. |
Represents an element hosting a widget.
Property | Type | Description |
---|---|---|
height | string | The element height in pixels. |
minHeight | integer | The minimum height in pixels to which the element can shrink. |
maxHeight | integer | The maximum height in pixels to which the element can expand. |
minWidth | integer | The maximum width in pixels to which the element can expand. |
maxWidth | integer | The maximum height in pixels to which the element can expand. |
widgetid | string | The ID of the contained widget. |
Defines widget behavior attributes.
Property | Arguments | Return Value | Description |
---|---|---|---|
refresh() | promise | Refreshes the widget. | |
redraw() | Requests a widget redraw. | ||
datasources() | [datasource] | Returns an array of data source objects used by the various widgets in the dashboard. | |
isEmpty() | boolean | Returns a response stating whether the dashboard is defined with widgets. | |
destroy() | Releases the resources of the dashboard object along with all it's contained widgets. |
Property | Type | Description |
---|---|---|
manifest | object | Returns the widget's read-only manifest declaration. |
datasource | datasource | Returns the widget's data source. |
metadata | widgetMetadata | Returns the widget's meta-data object. |
options | object | Returns the widget's options object. |
style | object | Returns the widget style object. |
initialized | boolean | States whether the widget was initialized. |
refreshing | boolean | States whether the widget is refreshing. |
queryResult | queryResult | Returns the last processed query result. Each widget has it's own processing logic that converts the raw, tabular query result and generates an object, which is more suitable for rendering by the widget. |
rawQueryResult | rawQueryResult | Returns the last pre-processed query result. |
Property | Type | Description |
---|---|---|
initialized | widget (widget) Widget instance. | Fired when the widget is initialized. |
domready | widget (widget) Widget instance. | Fired when the widget is rendered and added to the DOM. |
refreshed | widget (widget) Widget instance. | Fired when a widget is refreshed. |
buildquery | widget (widget) Widget instance. | Fired when executing the widget's native build query and allows customization of the JAQL query object before execution. |
beforequery | widget (widget) Widget instance. | Fired before the query is executed. |
querystart | widget (widget) Widget instance. | Fired when the widget's query starts. |
queryend | widget (widget) Widget instance. | Fired when the widget's query has ended. |
processresult | widget (widget) Widget instance. | Fired when executing the widget's native result processing, and allows customization of the query result before being rendered. |
render | widget (widget) Widget instance. | Fired when the widget is rendered. |
ready | widget (widget) Widget instance. | Fired when the widget's rendering is over and the widget is ready. |
readjust | widget (widget) Widget instance. | Fired when a layout change is applied to the widget. |
beforewidgetindashboardmenu | widget (widget) widget instance | Fired when clicking the widget's menu while viewing a dashboard. |
beforewidgetmenu | widget (widget) Widget instance. | Fired when clicking the widget menu while in Edit Widget mode. |
beforeviewloaded | widget (widget) Widget instance. /chart - final Highcharts options /scattermap - Object that contains the map instance and the array of markers. | Fired before the Highcharts object/map configuration is either updated or created. The event has two parameters, the first one is the widget model and the second is as described in the event arguments column. |
beforedatapointtooltip | widget (widget) Widget instance. | Fired for all widgets that render a tooltip. Allows hooking to the tooltip initialization flow, disables the default application tooltip, and creates a new tooltip instead, or overrides the default tooltip template. The event has two parameters; the first one is the widget model, and the second is as described in the event arguments column. The widgets that support the event are: scatter map, area map and all the charts. In maps it is not possible to use the default tooltip and add some more html to it, it is possible only to change it completely. For writing a property value from context, write in the template {{model.varPathFromContext}}. Example: For context.pointScope.total, the template is: ‘<div>{{model.pointScope.total}}</div>’ |
destroyed | widget (widget) Widget instance. | Fired when the widget is destroyed and it's resources are released. |
processcell | widget (widget) Widget instance. | Fired when a cell is being processed and enables customization of the cell attributes (text, data, color, size). |
Returns metadata for widgets in the dashboard.
Method | Arguments | Return Value | Description |
---|---|---|---|
panel | index (integer) | Gets a widget's metadata panel by index. | |
panel | name (string) | Gets a widget's metadata panel by name. | |
panel | predicate (function) | Gets the first widget panel that gets validated by the predicate. | |
items | predicate (function) | [jaql] | Gets the widget metadata items that get validated by the predicate. |
filters | [jaql] | Gets the array of widget filters. |
Property | Type | Description | |
---|---|---|---|
panels | Returns an array with the widget's panels. | ||
ignore | object
| Returns the widget's ignore declaration that states which dashboard filters should be ignored by the widget. Adds dimension IDs to the dimensions array to explicitly state which dimensions should be ignored, or sets the all attribute to true to ignore the dashboard filters. |
Method | Arguments | Return Value | Description |
---|---|---|---|
item | index (integer) | Gets an item by index | |
item | guid (string) | Gets an item by it's GUID. | |
item | predicate (function) | Gets the first item that gets validated by the predicate. | |
push | Adds the given JAQL item to the panel. | ||
push | [jaql] | Adds the given JAQL items array to the panel. | |
isEmpty | boolean | Returns a response stating whether the panel is empty or not. |
Property | Type | Description |
---|---|---|
items | [jaql] | Returns the panel items array. |
The manifest object used to register new widget types with Sisense.
Name | Type | Description | |
---|---|---|---|
name | string | Widget name. | |
family | string | Widget family name. | |
styleEditorTemplate | string | Widget editor template URL. | |
iconSmall | string | Widget small icon URL. The icon should be a sprite file of two 24x24 icons. | |
hideNoResults | bool | Defines whether the widget renders the default no result state. | |
noResultImg | string | URL for an image representing the no result state of the widget. | |
noResultImgSmall | string | URL for a small image representing the no result state of the widget. | |
options Default options object that should be defined for a newly created widget. The options object shares both common attributes along with widget-defined attributes. | |||
options.selector | boolean | Indicates if the widget should be a selector widget by default. Default = false. | |
options.disallowSelector | boolean | Indicates if the widget can act as a selector. Default = true. | |
options.dashboardFiltersMode | string | Indicates if the dashboard filters filter or highlight the widget when the same field is set to both the dashboard filters and the widget. Default = filter. | |
options.triggersDomready | boolean | Indicates if the widget is triggering the DOM-ready event once it's DOM representation was added to the DOM in full. | |
sizing Default sizing that defines the various sizing attributes for the defined widget type. | |||
sizing.minHeight | integer | States the minimum height to which the widget can shrink. | |
sizing.maxHeight | integer | States the maximum height to which the widget can grow. | |
sizing.minWidth | integer | States the minimum width to which the widget can shrink. | |
sizing.maxWidth | integer | States the maximum width to which the widget can grow. | |
sizing.height | integer | States the default height set for a newly created widget of the defined type. | |
directive Directives used as handlers for custom DOM content. Sisense uses custom directives for widgets to have a proper Views layer that handles the widget DOM rendering. | |||
directive.desktop | string | Desktop directive name and acts as the default name when the target device is not defined. | |
directive.tablet | string | Tablet directive name, with the desktop attribute as default fallback. | |
directive.mobile | string | Mobile directive name, with the desktop attribute as default fallback. | |
style Each widget type is defined with it’s own style object. | |||
data Widget data manifest object. | |||
data.selection | [ string ] | States which of the widget's data panels to use. A widget can include multiple data panels with metadata. For example, a pivot includes row, column, value and filter panels. | |
data.defaultQueryResult | object | Defines the default query result with which the widget is served. | |
data.buildQuery(...) | Arguments Returns | Gets a basic query object and is responsible for building the query from the current state of the widget. | |
data.processResult(...) | Arguments Returns | Prepares the widget-specific query result from the given result data-table. | |
data.rankMetadata(...) | Arguments Returns | Ranks the compatibility of the given metadata items with the widget. | |
data.populateMetadata(...) | Arguments | Implements the widget meta-data population of the items. | |
data.getMesaureFilteredItem(...) | Arguments Returns | Gets the data panel item on which the measure filter should be applied. | |
data.panels States the data panels array with which the widget is | |||
string | States the name of the panel. | ||
panel.type | string | States the type of the panel. | |
panel.noDrag | boolean | Indicates if data items can be dragged in/out to/from the panel. | |
panel.visibility(...) | Arguments Returns | Dynamically show/hides the panel. | |
panel.defaultFormatter(...) | Arguments Returns
| Generates the default format object to be attached by default to panel items. | |
panel.canMask(...) | Arguments Returns | Determines whether the item can be masked. | |
panel.color(...) | Arguments Returns | Applies custom coloring to every result cell. | |
panel.size(...) | Arguments Returns | Applies custom sizing to every result cell. | |
panel.mask(...) | Arguments Returns | Applies custom masking to every result cell. | |
panel.itemAttributes | [ string ] | Array of supported formatting attributes for the panel’s data items. Available values are color and size. | |
panel.canDisableItems | boolean | Defines whether items on the panel can be disabled. | |
panel.itemDisabledStateChanged(...) | Arguments | Triggered when an item was enabled or disabled. | |
panel.allowedColoringTypes(...) | Arguments Returns
| Determine which of the following coloring methods are supported by the given widget color, range, or condition. | |
panel.itemAdded(...) | Arguments | Called when a new item is added to the panel. | |
panel.metadata | |||
metadata.types | [ string ] | Defines the JAQL types the panel can hold - measures and dimensions (I/E ["measures", "dimensions"] allows addition of both measures and dimensions. | |
metadata.maxitems | integer | Defines the maximal number of items the panel can hold. | |
metadata.mixed | boolean | Defines whether the panel can mix both Measures and Dimensions. | |
metadata.sortable(...) | Arguments Returns | Determine whether a given item in the given widget instance can be sorted. |
Groups a set of widget-layout related attributes in a single object.
Property | Type | Description |
---|---|---|
col | column object | Ancestor column object. |
colidx | integer | Column index. |
cell | cell object | Ancestor cell object. |
cellidx | integer | Cell index in its parent column cells collection. |
subcell | subcell object | Ancestor sub-cell object. |
subcellidx | integer | Sub-cell index in its parent cell sub-cells collection. |
element | element object | Parent element object. |
elementidx | integer | Element index in its parent sub-cell elements collection. |
The indicatorInstance object represents an Indicator widget.
You can modify the styling of an Indicator widget through the indicatorInstance object setOptions method.
Note: This object is available from Sisense V6.7.1 and later.
Example:
widget.on('initialized', function(w) { var options = { title: { fontFamily: 'Helvetica, sans-serif', fontWeight: 'bold', fontSizes: { big: 40, medium: 30 }, color: '#29aba4' }, value: { fontFamily: 'Helvetica, sans-serif', fontStyle: 'italic', color: '#e9e0d6' }, bracketColor: '#f2ae72' }; w.indicatorInstance.setOptions('numericBar', options); }); |
The following images display labels that define all the elements you can customize for each type of Indicator widget.
Method | Arguments | Return Value | Description |
setOptions | type options | The setOptions method defines styling for an Indicator widgets. type: Defines the type widget to be modified. The supported values are as follows:
options: Options for specified type of indicator. See the Options Structure below for more information. |
Property | Type | Details |
These properties applies to all Indicator widget types | ||
title | object | Set of options to style the title section of an Indicator widget. The object has following properties:
|
value | object | Set of options to style the value section. The object has following properties:
|
secondaryTitle | object | Set of options to style secondaryTitle section. The object has following properties:
|
secondaryValue | object | Set of options to style secondaryValue section. The object has following properties:
|
backgroundColor | string | Background color of the indicator widget. |
Gauge Indicator widget specific properties | ||
label | object | Set of options to style label sections. The object has following properties:
|
needleColor | string | Color of the needle. |
tickColor | string | Color of the ticks. |
bracketColor | string | Color of the brackets. |
Numeric Simple Indicator widget specific properties | ||
borderColor | string | Color of the border. |
Numeric Bar Indicator widget specific properties | ||
bracketColor | string | Color of the brackets. |
Ticker Indicator widget specific properties. Note, that ticker properties will be used by all the indicator types' tickers | ||
dividerColor | string | Color of the divider. |
barHandleColor (only for gauge type) | string | Color of the bar handle. |
Global events are available for registration via prism.on(eventname).
Event Name | Event Arguments | Description |
---|---|---|
apploaded | Fired when the whole Sisense Web Application is loaded. | |
beforemenu | settings name: Menu name. ui ... | Fired before every menu is opened and allows the removal of existing menu items and the addition of custom menu items. Available menu names to customize:
|
beforewidgetmenu | widget (widget) Widget instance. | Fired when clicking the widget menu while in Edit Widget mode. |
beforewidgetindashboardmenu | widget (widget) widget instance | Fired when clicking the widget's menu while viewing a dashboard. |
homeloaded | Fired when the home page in the Sisense Web Application is loaded. | |
widgetloaded | widget: (widget) Widget instance. | Fired when a widget model was loaded to the widget editor. |
unwidgetloaded | widget: (widget) widget instance. | Fired when a dashboard model was unloaded from the widget editor. |
beforedashboardloaded | dashboard: Dashboard JSON. | Fired before a dashboard JSON is loaded into a dashboard model. |
dashboardloaded | dashboard: (dashboard) Dashboard instance. | Fired when a dashboard model is loaded into the environment. |
dashboardunloaded | dashboard: (dashboard) Dashboard instance. | Fired when a dashboard model is unloaded from the environment. |