This is the base class that all insight widgets extend. This class should not be instantiated directly.
Example
define([
"blueconic/api/widgets/plugins/_BaseInsight"
], function(_BaseInsight) {
// ...
});
Extends
Properties
-
additionalName String
-
The additional name of the insight, as shown after the name field in the header.
-
dashboardContext blueconic.api.data.domain.DashboardContext
-
The parameters set on the dashboard this insight is on.
-
name String
-
The name of the insight, as shown in the header.
-
inherited parameters blueconic.api.data.domain.Parameters
-
Parameters for this plugin, injected by the framework.
Functions
-
exportData(baseUrl)
-
Called when export button is pressed.
Should be overridden to return a valid Excel file.Name Type Description baseUrl String The most secure base URL of the server on which authorized REST calls can be done.
-
inherited getParameters()blueconic.api.data.domain.Parameters
-
Return the parameters object.
Parameter update logic should be implemented here.Returns:
Type Description blueconic.api.data.domain.Parameters The updated parameters object. -
getSettingsWidget()blueconic.api.widgets.plugins._BaseInsightSettings | null
-
Returns a widget that will be placed in the settings area of the Insight.
The InsightWidgetWrapper will call this method.
Whennull
is returned the wrapper will hide the settings icon.Returns:
Type Description blueconic.api.widgets.plugins._BaseInsightSettings |
nullThe settings widget or null
. -
hideLoader()
-
Hide the loader.
-
hidePlaceholder(checkProfileCount)
-
Hide the no data placeholder.
Name Type Description checkProfileCount boolean Checks the profile count (> 10) before hiding the placeHolder. Default false.
-
isConfigurationComplete()Boolean
-
Returns whether or not the configuration is complete. By default checks if the parameters object has not-empty values.
Override this function for custom validations.Returns:
Type Description Boolean Whether or not the configuration is complete. Example
isConfigurationComplete: function() { var profilePropertyId = this.parameters.getValue("profilePropertyId"); var segmentId = this.parameters.getValue("segmentId"); if (!profilePropertyId || !segmentId) { return false; } return true; },
-
openSettings()
-
Open the settings tooltip.
Note that this function cannot be called from postCreate, only after startup of the widget. -
resize()
-
Called when a widget should resize its content.
-
showLoader()
-
Show the loader.
-
showPlaceholder()
-
Show the no data placeholder.