DashboardContext

This class holds the current state of the Dashboard.
It is injected into to the Insight plugins by the framework.

Example
define([
  "blueconic/api/data/domain/DashboardContext"
], function(DashboardContext) {
  var dashboardContext = new DashboardContext();
  // ...
});

Properties

compare boolean

Indicates whether the dashboard is in 'compare'-mode (e.g. the compare period checkbox is on). Default the option is set to false.

endDate Date

End date of the selected periodType. Applicable for all period types except ALLTIME.

periodType blueconic.api.data.domain.DashboardContext.PERIOD

Period type selected for this dashboard.

startDate Date

Start date of the selected periodType. Applicable for all period types except ALLTIME.

readonly PERIOD String

All possible values of a period definition.

Properties:
Name Description
ALLTIME

Use all data available.

LASTDAY

Use data from the last day.

LASTWEEK

Use data from the last week.

LASTMONTH

Use data from the last month.

LASTQUARTER

Use data from the last quarter.

LASTYEAR

Use data from the last year.

CUSTOM

Use data from a custom defined period.

readonly RENDER_MODE String

All possible render modes in which a dashboard can be rendered

Properties:
Name Description
STANDALONE_PRINT
STANDALONE_EMAIL
REGULAR

Functions

onChange()

When one of the properties in this object changes, this event is triggered.