Class RevealView

Used to create a new instance of the RevealView class. The main class used to render a dashboard in your application, it also allows the editing of existing dashboards or the creation from scratch.

Hierarchy

  • RevealView

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • Instantiates a new RevealView component and renders it at the provided DOM selector location.

    Parameters

    • selector: string

      Selector to the DOM element where the RevealView should be rendered. Exception is thrown if no element is found in DOM matching the selector.

    Returns RevealView

Properties

categoryGroupingSeparator

categoryGroupingSeparator: null | string = null

This property allows customization of the grouping separator that appears between the category and field name. The default character used is "/" (forward slash).

revealView.categoryGroupingSeparator = " - ";

defaultChartType

defaultChartType: RVChartType = ...

This property allows the customization of the default visualization when a new visualization is created.

revealView.defaultChartType = RVChartType.ColumnChart;

defaultCustomChartType

defaultCustomChartType: null | string = null

onConfigureCredentials

onConfigureCredentials: null | function = null

This event is triggered when Reveal is requesting credentials for a given data source, and only when the creation of new data sources is not enabled (by adding providers to addDataSourceEnabledProviders). This is optional, as you can specify server side credentials for all your data sources, but if you don't know in advance credentials your users should use (for example if you want your users to enter their own credentials to the database) you can use this approach. Please note how credentials are requested and stored is something you need to do in your application, this event indicates credentials are needed, once the user entered credentials (or cancelled the flow) you must call the callback function received as a parameter, the function receives a boolean parameter that indicates if Reveal should try again (true) or the prompt was cancelled (false).

@example

revealView.onConfigureCredentials = function (ds, callback) { //TODO: prompt for credentials, store them in your server and call the callback function when ready };

onDashboardChanged

onDashboardChanged: null | function = null

Event triggered when the dashboard property is set to a new instance of an RVDashboard. The event handler receives one argument:

  • args: An instance of DashboardChangedEventArgs which contains the old and new dashboards.

Remarks: If the dashboard property is set to null, a new dashboard is created automatically with a title "New Dashboard".

Example usage:

revealView.onDashboardChanged = function (args: DashboardChangedEventArgs) {
  console.log('Dashboard has changed.');
  console.log('Old Dashboard:', args.oldValue);
  console.log('New Dashboard:', args.newValue);
};

onDashboardSelectorRequested

onDashboardSelectorRequested: null | function = null

onDataSourceSelectionDialogShowing

onDataSourceSelectionDialogShowing: null | function = null

Event called when the list of data sources is about to be displayed, this is the way to show your own UI for the list of data sources instead of the default UI. If this handler is not installed Reveal will use the default dialog for selecting a data source.

onDataSourcesRequested

onDataSourcesRequested: null | function = null

This event is triggered whenever the end user clicks on the 'Add visualization' button. You can create custom datasources to replace the default/existing ones. The argument is a callback function you're supposed to call and pass your custom collection of datasources which the end user will see.

revealView.onDataSourcesRequested = function (callback, trigger) {
    if(trigger == RVDataSourcesRequestedTriggerType.Visualization){
        var inMemoryDSI = new RVInMemoryDataSourceItem("employees");
        inMemoryDSI.title = "My InMemory Title";
        inMemoryDSI.description ="My InMemory Description";

        var sqlDs = new RVSqlServerDataSource();
        sqlDs.title = "Clients";
        sqlDs.id = "SqlDataSource1";
        sqlDs.host = "db.mycompany.local";
        sqlDs.port = 1433;
        sqlDs.database = "Invoices";

        callback(new $.ig.RevealDataSources([sqlDs], [inMemoryDSI], true));
    }
};

onEditModeEntered

onEditModeEntered: null | function = null

onEditModeExited

onEditModeExited: null | function = null

onFieldsInitializing

onFieldsInitializing: null | function = null

This event is triggered when entering the visualization editor after selecting your data source. With this event you can customize the list of fields shown in the editor by removing, renaming, or reordering fields.

revealView.onFieldsInitializing = function (args) {
   var editedFields = args.fields;
   // a example of how you can delete fields
   // list of field names to be deleted  
   var exclude = ["Date", "Budget", "CTR", "Avg.CPC", "Avg. CPC", "Traffic"];
   // deleted the fields 
   editedFields = editedFields.filter(f => !exclude.some(e => e == f.name));
   //change name to show to Spend field to Spent
   var fieldToChange = editedFields.find(f => f.name == "Spend");
   if (fieldToChange) { fieldToChange.label = "Spent"; }
   //change order
   args.useCustomSort = true; //when set to true the fields are displayed in the same order   as in args.fields
   // if you want to re order only the first two positions
   var newOrder = ["Organic %", "Spend"]; // change the order for the first two position, 

   //for this example spend will be in the first position and Organic in the second position, 
   //the rest of the fields will be kept in the order they had in args fields 
   newOrder.forEach(function (field) {
     var moveFiled = editedFields.find(function (f) {
       return f.name === field;
     });
     if (editedFields.indexOf(moveFiled) !== -1) {
       editedFields.splice(editedFields.indexOf(moveFiled), 1);
       editedFields.unshift(moveFiled);
     }
   });
   args.fields = editedFields
}

onImageExported

onImageExported: null | function = null

This event is triggered whenever the end user clicks the 'Export Image' button in the 'Export Image' popup after annotating the screenshot (optional).

Note: This feature relies on server-side image rendering, so you will need to enable in your .NET Core or Java Reveal server component.

revealView.onImageExported = function (img) {
  console.log(img);
};

onLinkedDashboardProviderAsync

onLinkedDashboardProviderAsync: null | function = null

Will be called when a linked dashboard is needed either if the user tries to follow a dashboard link or tries to create a dashboard link while editing.

Note: This callback is expected to return a Promise of an RVDashboard.

revealView.onLinkedDashboardProviderAsync = function (dashboardId, linkTitle) {
    return $.ig.RVDashboard.loadDashboardAsync(dashboardId);
};

onMaximizedVisualizationChanged

onMaximizedVisualizationChanged: null | function = null

This event is triggered when the end user maximizes or minimizes a visualization. If the action is maximizing, the visualization the title of the maximized visualization can be retrieved via the maximizedVisualization property of the revealView object.

revealView.onMaximizedVisualizationChanged = function () {
    maximizedVisualization = revealView.maximizedVisualization;
    msg = "";
    if (maximizedVisualization != null) {
        msg = maximizedVisualization.title;
    } else {
         msg = "no current maximized visualization";
    }
    console.log("Maximized visualization changed! " + msg);
};

onMenuOpening

onMenuOpening: null | function = null

This event is triggered when the overflow is clicked on the dashboard or visualization to expose the menu. Using this event, you can customize what is shown in that menu.

revealView.onMenuOpening = function (visualization, args) {
  for (var i = 0; i < args.menuItems.length; i++)
  {
    if (i == 2)
    {
      args.menuItems[i].isHidden = true;
    }
    if (args.menuItems[i].title === "Edit")
    {
      args.menuItems[i].title = "Edit Mode";
    }
  }

  var icon = new $.ig.RVImage("https://svgsilh.com/png-512/1088490.png", "Icon");
  args.menuItems.push(new $.ig.RVMenuItem("Cool Menu Item", icon, () => { alert('Example'); }));
}

onSave

onSave: null | function = null

This event is triggered when the end user clicks 'Save' or 'Save As'. However, if this event is set in RevealView then the callback server side (SaveDashboardAsync) will not be called, and the application will handle how the dashboard is saved, for example by implementing its own controller server side.

revealView.onSave = function (rv, saveEvent) {
   if (saveEvent.saveAs) {
       var newName = prompt("Save as", dashboardId);
          if (!newName) return;
           saveEvent.serializeWithNewName(newName,
               function (b) {
                   saveDashboard(newName, b, saveEvent);
           });
       } else {
           saveEvent.serialize(
               function (b) {
                   saveDashboard(dashboardId, b, saveEvent);
               });
       }
};

onTooltipShowing

onTooltipShowing: null | function = null

Event fired when the user hover over a visualization and a tooltip is about to show up.

revealView.onTooltipShowing = function (args) {
{
   var vizTitle = args.Visualization.Title;
   if(vizTitle == "noNeedForTooltipsHere")
   {
       args.Cancel = true;
   }
}

onUrlLinkRequested

onUrlLinkRequested: null | function = null

Will be called when a url is needed if the user tries to follow a dashboard link. If this method is not provided, the link defined in the dashboard will be used. Note: This callback is expected to return the modified url.

revealView.onUrlLinkRequested = function (args) {
    return args.url + "&modfiedUrl=true";
};

onVisualizationDataLoading

onVisualizationDataLoading: null | function = null

This event triggered when a visualization is about to request data, the event can be canceled if showing data for the visualization is not allowed. Using the args parameter you could cancel the data request by setting args.cancel to true and set the message to be displayed to the end user by setting cancel.errorMessage. See VisualizationDataLoadingEventArgs.

JavaScript:

revealView.onVisualizationDataLoading = function (args) {
    if(!hasAccess(args.visualization)){ 
         args.cancel = true;
         args.errorMessage = "You don't have access to this data";
    }
};

TypeScript:

    revealView.onVisualizationDataLoading = (args:RevealApi.VisualizationDataLoadingEventArgs) => 
    {
         if(!hasAccess(args.visualization)){ 
              args.cancel = true;
              args.errorMessage = "You don't have access to this data";
     } 
 }

onVisualizationDataPointClicked

onVisualizationDataPointClicked: null | function = null

This event is triggered whenever the end user clicks on a data point over a maximized visualization and not in edit mode.

revealView.onVisualizationDataPointClicked = function (visualization, cell, row) {
  console.log("Visualization Data Point Clicked");
  console.log(visualization.title);
  console.log(cell.columnLabel);
  console.log(cell.value);
  console.log(cell.formattedValue);
  console.log("First cell in the row has label:" + row[0].columnLabel)
}

onVisualizationEditorClosed

onVisualizationEditorClosed: null | function = null

Event triggered when the visualization editor is closed. Using the args parameter you could check if this is a brand new visualization or the user edited an existing one. The isCancelled flag can be used to determine whether the changes were applied or discarded. The isCancelled is true when the later is true.

revealView.onVisualizationEditorClosed = function (args) {
    if(args.isNewVisualization == false) { 
    }
};

onVisualizationEditorClosing

onVisualizationEditorClosing: null | function = null

This event is triggered when the end user clicks on cancel("x") button upon editing/creating a visualization. Using the args parameter you could check if this is a brand new visualization or the user is editing an existing one. You could also cancel the process of exiting edit mode by setting args.cancel to true.

revealView.onVisualizationEditorClosing = function (args) {
    if(args.isNewVisualization == false){ //the user is editing
         args.resetVisualization = true; //puts the widget to the state when it was when the user started editing it
    }
};

onVisualizationEditorOpened

onVisualizationEditorOpened: null | function = null

Event triggered when the visualization editor is opened. Using the args parameter you could check if this is a brand new visualization or the user is editing an existing one.

revealView.onVisualizationEditorOpened = function (args) {
    if(args.isNewVisualization == false) { //the user is editing an existing visualization
    }
};

onVisualizationEditorOpening

onVisualizationEditorOpening: null | function = null

This event is triggered whenever the end user is trying to open the editor for a visualization. Using the args parameter you could check if this is a brand new visualization or the user is trying to edit an existing one. You could also cancel the process of entering the editor by setting args.cancel to true.

  revealView.onVisualizationEditorOpening = function (args) {
    if(args.isNewVisualization == false){
      //the user is trying to edit an existing visualization
      args.cancel = true; //prevent it
    }
};

onVisualizationSeriesColorAssigning

onVisualizationSeriesColorAssigning: null | function = null

This event is triggered when the chart visualization loads and is in the process of creating each series. With this event you can customize the color used for the series.

revealView.onVisualizationSeriesColorAssigning = function (visualization, defaultColor, fieldName, categoryName) {
  console.log("Visualization is creating a series");
  console.log(visualization.title);
  console.log(fieldName);
  console.log(categoryName);
  return defaultColor;
}

Static getCurrentTheme

getCurrentTheme: function = ...

Returns the currently applied theme.

@deprecated

This method is deprecated. Use RevealSdkSettings.theme property to get/set current theme.

Type declaration

Accessors

addDataSourceEnabledProviders

  • The list of providers that will be allowed when clicking "+ Data Source" in the data source selector, if empty (the default) or null data source creation will be disabled.

    Returns RVProviderType[]

  • The list of providers that will be allowed when clicking "+ Data Source" in the data source selector, if empty (the default) or null data source creation will be disabled.

    Parameters

    Returns void

assets

canAddCalculatedFields

  • get canAddCalculatedFields(): Boolean
  • set canAddCalculatedFields(v: Boolean): void
  • A flag indicating if new (calculated) fields can be added to the list of fields.

    @default

    true

    Returns Boolean

  • A flag indicating if new (calculated) fields can be added to the list of fields.

    Parameters

    • v: Boolean

    Returns void

canAddDashboardFilter

  • get canAddDashboardFilter(): Boolean
  • set canAddDashboardFilter(v: Boolean): void
  • A flag that indicates if the end user will be allowed to create dashboard filters.

    @default

    true

    Returns Boolean

  • A flag that indicates if the end user will be allowed to create dashboard filters.

    Parameters

    • v: Boolean

    Returns void

canAddDateFilter

  • get canAddDateFilter(): Boolean
  • set canAddDateFilter(v: Boolean): void
  • A flag that indicates if the end user will be allowed to create date filter.

    @default

    true

    Returns Boolean

  • A flag that indicates if the end user will be allowed to create date filter.

    Parameters

    • v: Boolean

    Returns void

canAddPostCalculatedFields

  • get canAddPostCalculatedFields(): Boolean
  • set canAddPostCalculatedFields(v: Boolean): void
  • A flag indicating if the f(x) option in numeric values sections (like "Values") should be displayed or not.

    @default

    true

    Returns Boolean

  • A flag indicating if the f(x) option in numeric values sections (like "Values") should be displayed or not.

    Parameters

    • v: Boolean

    Returns void

canAddVisualization

  • get canAddVisualization(): Boolean
  • set canAddVisualization(canAddVisualization: Boolean): void
  • A flag that indicates if new visualizations can be added when the dashboard is edited.

    @default

    true

    Returns Boolean

  • A flag that indicates if new visualizations can be added when the dashboard is edited.

    Parameters

    • canAddVisualization: Boolean

    Returns void

canChangeVisualizationBackgroundColor

  • get canChangeVisualizationBackgroundColor(): boolean
  • set canChangeVisualizationBackgroundColor(v: boolean): void
  • A flag indicating if the end-user can change the background color for a given visualization in the visualization editor (under Settings tab), if enabled the list of colors specified via RevealTheme.backgroundColors will be displayed as a suggested palette, but the user can also use an advanced mode to select any color. In the future, this property will be removed and the background color setting will be automatically visible in the visualization editor settings.

    @default

    true

    @deprecated

    Returns boolean

  • A flag indicating if the end-user can change the background color for a given visualization in the visualization editor (under Settings tab), if enabled the list of colors specified via RevealTheme.backgroundColors will be displayed as a suggested palette, but the user can also use an advanced mode to select any color. In the future, this property will be removed and the background color setting will be automatically visible in the visualization editor settings.

    Parameters

    • v: boolean

    Returns void

canCopyVisualization

  • get canCopyVisualization(): Boolean
  • set canCopyVisualization(v: Boolean): void
  • A flag that indicates if the "Copy" option is available in the menu for a visualization.

    @default

    true

    Returns Boolean

  • A flag that indicates if the "Copy" option is available in the menu for a visualization.

    Parameters

    • v: Boolean

    Returns void

canDuplicateVisualization

  • get canDuplicateVisualization(): Boolean
  • set canDuplicateVisualization(v: Boolean): void
  • A flag that indicates if the "Duplicate" option is available in the menu for a visualization.

    @default

    true

    Returns Boolean

  • A flag that indicates if the "Duplicate" option is available in the menu for a visualization.

    Parameters

    • v: Boolean

    Returns void

canEdit

  • get canEdit(): Boolean
  • set canEdit(canEdit: Boolean): void
  • A flag indicating if the user can switch to edit mode or not.

    @default

    true

    Returns Boolean

  • A flag indicating if the user can switch to edit mode or not.

    Parameters

    • canEdit: Boolean

    Returns void

canMaximizeVisualization

  • get canMaximizeVisualization(): Boolean
  • set canMaximizeVisualization(v: Boolean): void
  • A flag that indicates if the maximize visualization would be visible and the user would be able to maximize visualizations.

    @default

    true

    Returns Boolean

  • A flag that indicates if the maximize visualization would be visible and the user would be able to maximize visualizations.

    Parameters

    • v: Boolean

    Returns void

canSaveAs

  • get canSaveAs(): Boolean
  • set canSaveAs(v: Boolean): void
  • A flag indicating if the user can 'Save as' the dashboard.

    @default

    true

    Returns Boolean

  • A flag indicating if the user can 'Save as' the dashboard.

    Parameters

    • v: Boolean

    Returns void

chartTypes

  • get chartTypes(): RVChartTypeItem[]
  • set chartTypes(v: RVChartTypeItem[]): void
  • The list of available chart types for the end user to select from. Please note this only affects the list of visualizations to pick from, if a given dashboard is using a visualization not listed here, that visualization will be used anyway. The list is initially populated with all supported visualization types, so you can just remove the ones you would like to get excluded. Please note that RVChartType.Pivot and RVChartType.Image are used as the initial chart type for a new visualization (depending on the source selected) regardless if those types are not included in this list.

    Returns RVChartTypeItem[]

  • The list of available chart types for the end user to select from. Please note this only affects the list of visualizations to pick from, if a given dashboard is using a visualization not listed here, that visualization will be used anyway. The list is initially populated with all supported visualization types, so you can just remove the ones you would like to get excluded. Please note that RVChartType.Pivot and RVChartType.Image are used as the initial chart type for a new visualization (depending on the source selected) regardless if those types are not included in this list.

    Parameters

    • v: RVChartTypeItem[]

    Returns void

crosshairsEnabled

  • get crosshairsEnabled(): Boolean
  • set crosshairsEnabled(v: Boolean): void
  • A flag indicating if crosshairs are displayed for charts.

    @default

    false

    Returns Boolean

  • A flag indicating if crosshairs are displayed for charts.

    Parameters

    • v: Boolean

    Returns void

dashboard

  • Get/set the dashboard that is/should be rendered.

    Returns null | RVDashboard

  • Get/set the dashboard that is/should be rendered.

    Parameters

    Returns void

hoverTooltipsEnabled

  • get hoverTooltipsEnabled(): Boolean
  • set hoverTooltipsEnabled(v: Boolean): void
  • A flag indicating if tooltips are displayed on hover for chart visualizations.

    @default

    true

    Returns Boolean

  • A flag indicating if tooltips are displayed on hover for chart visualizations.

    Parameters

    • v: Boolean

    Returns void

interactiveFilteringEnabled

  • get interactiveFilteringEnabled(): Boolean
  • set interactiveFilteringEnabled(v: Boolean): void
  • A flag indicating if interactive filtering is enabled.

    @default

    false

    Returns Boolean

  • A flag indicating if interactive filtering is enabled.

    Parameters

    • v: Boolean

    Returns void

isPreviewDataInVisualizationEditorEnabled

  • get isPreviewDataInVisualizationEditorEnabled(): Boolean
  • set isPreviewDataInVisualizationEditorEnabled(value: Boolean): void
  • In Dashboard Editor, indicates if a small set of data should be displayed as tooltip when moving the mouse over a field.

    Returns Boolean

  • In Dashboard Editor, indicates if a small set of data should be displayed as tooltip when moving the mouse over a field.

    Parameters

    • value: Boolean

    Returns void

maximizedVisualization

  • Returns null | RVVisualization

    the maximized visualization object if any, null if no visualization is maximized

  • Parameters

    Returns void

    the maximized visualization object if any, null if no visualization is maximized

serverSideSave

  • get serverSideSave(): Boolean
  • set serverSideSave(v: Boolean): void
  • A flag indicating if server side saving is enabled.

    @default

    true

    Returns Boolean

  • A flag indicating if server side saving is enabled.

    Parameters

    • v: Boolean

    Returns void

showBreadcrumb

  • get showBreadcrumb(): Boolean
  • set showBreadcrumb(v: Boolean): void
  • Gets the visibility status of the drill down breadcrumb.

    Returns Boolean

    • true if the breadcrumb is visible, false otherwise. Default is true.
  • Sets the visibility of the drill down breadcrumb.

    Parameters

    • v: Boolean

      If true, the breadcrumb will be shown; if false, it will be hidden.

    Returns void

    • true if the breadcrumb is visible, false otherwise. Default is true.

showBreadcrumbDashboardTitle

  • get showBreadcrumbDashboardTitle(): Boolean
  • set showBreadcrumbDashboardTitle(v: Boolean): void
  • Gets the visibility status of the dashboard title in the breadcrumb when the visualization is maximized.

    Returns Boolean

    • true if the dashboard title in the breadcrumb is visible when maximized, false otherwise. Default is false.
  • Sets the visibility of the Dashboard title in the breadcrumb when the visualization is maximized.

    Parameters

    • v: Boolean

      If true, the Dashboard title in the breadcrumb will be shown when maximized; if false, it will be hidden.

    Returns void

    • true if the dashboard title in the breadcrumb is visible when maximized, false otherwise. Default is false.

showChangeDataSource

  • get showChangeDataSource(): Boolean
  • set showChangeDataSource(v: Boolean): void
  • A flag that indicates if the "Change data source" button should be displayed or not.

    @default

    true

    Returns Boolean

  • A flag that indicates if the "Change data source" button should be displayed or not.

    Parameters

    • v: Boolean

    Returns void

showChangeVisualization

  • get showChangeVisualization(): Boolean
  • set showChangeVisualization(v: Boolean): void
  • A flag indicating if the button to change visualization should be available or not, this button is used to switch to another visualization type (for example from Bar to Column chart) without entering edit mode.

    @default

    true

    Returns Boolean

  • A flag indicating if the button to change visualization should be available or not, this button is used to switch to another visualization type (for example from Bar to Column chart) without entering edit mode.

    Parameters

    • v: Boolean

    Returns void

showDataBlending

  • get showDataBlending(): Boolean
  • set showDataBlending(showDataBlending: Boolean): void
  • A flag indicating if the button "Add fields from another data source" (in the visualization editor) should be available or not.

    @default

    true

    Returns Boolean

  • A flag indicating if the button "Add fields from another data source" (in the visualization editor) should be available or not.

    Parameters

    • showDataBlending: Boolean

    Returns void

showDataSourceSelectionDialogSearch

  • get showDataSourceSelectionDialogSearch(): Boolean
  • set showDataSourceSelectionDialogSearch(v: Boolean): void
  • A flag indicating if the data source selection dialog (displayed when creating a new visualization) includes a search box on top to search for data sources.

    @default

    false

    Returns Boolean

  • A flag indicating if the data source selection dialog (displayed when creating a new visualization) includes a search box on top to search for data sources.

    Parameters

    • v: Boolean

    Returns void

showDescription

  • get showDescription(): Boolean
  • set showDescription(v: Boolean): void
  • A flag indicating if the Dashboard's description should be displayed.

    @default

    true

    Returns Boolean

  • A flag indicating if the Dashboard's description should be displayed.

    Parameters

    • v: Boolean

    Returns void

showEditDataSource

  • get showEditDataSource(): Boolean
  • set showEditDataSource(v: Boolean): void
  • A flag that indicates if the edit button for a datasource in the visualization editor should be displayed or not.

    @default

    false

    Returns Boolean

  • A flag that indicates if the edit button for a datasource in the visualization editor should be displayed or not.

    Parameters

    • v: Boolean

    Returns void

showExportImage

  • get showExportImage(): Boolean
  • set showExportImage(v: Boolean): void
  • A flag indicating if the export image action is available or not.

    @default

    true

    Returns Boolean

  • A flag indicating if the export image action is available or not.

    Parameters

    • v: Boolean

    Returns void

showExportToExcel

  • get showExportToExcel(): Boolean
  • set showExportToExcel(v: Boolean): void
  • A flag indicating if the export to Excel action is available or not.

    @default

    true

    Returns Boolean

  • A flag indicating if the export to Excel action is available or not.

    Parameters

    • v: Boolean

    Returns void

showExportToPDF

  • get showExportToPDF(): Boolean
  • set showExportToPDF(v: Boolean): void
  • A flag indicating if the export to PDF action is available or not.

    @default

    true

    Returns Boolean

  • A flag indicating if the export to PDF action is available or not.

    Parameters

    • v: Boolean

    Returns void

showExportToPowerPoint

  • get showExportToPowerPoint(): Boolean
  • set showExportToPowerPoint(v: Boolean): void
  • A flag indicating if the export to PowerPoint action is available or not.

    @default

    true

    Returns Boolean

  • A flag indicating if the export to PowerPoint action is available or not.

    Parameters

    • v: Boolean

    Returns void

showFilters

  • get showFilters(): Boolean
  • set showFilters(v: Boolean): void
  • A flag that allows the dashboard filters panel to be hidden. This is useful if you want to limit the selected values for the filters to the initial selection specified in the dashboard object. Once the RevealView is created and rendered you can use RVDashboard.filters or RVDashboard.dateFilter to change the selection for a given filter, so you can keep the selected values synced with your app.

    @default

    true

    Returns Boolean

  • A flag that allows the dashboard filters panel to be hidden. This is useful if you want to limit the selected values for the filters to the initial selection specified in the dashboard object. Once the RevealView is created and rendered you can use RVDashboard.filters or RVDashboard.dateFilter to change the selection for a given filter, so you can keep the selected values synced with your app.

    Parameters

    • v: Boolean

    Returns void

showHeader

  • get showHeader(): Boolean
  • set showHeader(v: Boolean): void
  • A flag that indicates if dashboard header will be rendered. Please note that if you hide the header bar UI controls to save, save as, export wont be available for the end user.

    @default

    true

    Returns Boolean

  • A flag that indicates if dashboard header will be rendered. Please note that if you hide the header bar UI controls to save, save as, export wont be available for the end user.

    Parameters

    • v: Boolean

    Returns void

showMachineLearningModelsIntegration

  • get showMachineLearningModelsIntegration(): Boolean
  • set showMachineLearningModelsIntegration(v: Boolean): void
  • A flag indicating if the button "Add fields from a Machine Learning model" (in the visualization editor) should be available or not.

    @default

    false

    Returns Boolean

  • A flag indicating if the button "Add fields from a Machine Learning model" (in the visualization editor) should be available or not.

    Parameters

    • v: Boolean

    Returns void

showMenu

  • get showMenu(): Boolean
  • set showMenu(v: Boolean): void
  • A flag that indicates if the menu (containing Refresh, Export, etc.) should be displayed or not.

    @default

    true

    Returns Boolean

  • A flag that indicates if the menu (containing Refresh, Export, etc.) should be displayed or not.

    Parameters

    • v: Boolean

    Returns void

showRefresh

  • get showRefresh(): Boolean
  • set showRefresh(v: Boolean): void
  • A flag that indicates if the Refresh action should be available or not.

    @default

    true

    Returns Boolean

  • A flag that indicates if the Refresh action should be available or not.

    Parameters

    • v: Boolean

    Returns void

showStatisticalFunctions

  • get showStatisticalFunctions(): Boolean
  • set showStatisticalFunctions(v: Boolean): void
  • A flag indicating if the menu to apply statistical functions (forecasting, etc.) is available or not.

    @default

    true

    Returns Boolean

  • A flag indicating if the menu to apply statistical functions (forecasting, etc.) is available or not.

    Parameters

    • v: Boolean

    Returns void

singleVisualizationMode

  • get singleVisualizationMode(): Boolean
  • set singleVisualizationMode(v: Boolean): void
  • Single visualization mode is used to show a single visualization at a time. You can control the initial visualization to maximize using the maximizedVisualization property. If no initial visualization is configured to be maximized the first one will be maximized initially. You can use maximizedVisualization to change the maximized one once the dashboard is visible.

    @default

    true

    Returns Boolean

  • Single visualization mode is used to show a single visualization at a time. You can control the initial visualization to maximize using the maximizedVisualization property. If no initial visualization is configured to be maximized the first one will be maximized initially. You can use maximizedVisualization to change the maximized one once the dashboard is visible.

    Parameters

    • v: Boolean

    Returns void

startInEditMode

  • get startInEditMode(): Boolean
  • set startInEditMode(startInEditMode: Boolean): void
  • A flag indicating the view should start in edit mode instead of the default view mode.

    @default

    false

    Returns Boolean

  • A flag indicating the view should start in edit mode instead of the default view mode.

    Parameters

    • startInEditMode: Boolean

    Returns void

startWithNewVisualization

  • get startWithNewVisualization(): Boolean
  • set startWithNewVisualization(v: Boolean): void
  • A flag indicating the new visualization dialog should be displayed automatically when this view is presented. This setting requires startInEditMode set to true.

    @default

    false

    Returns Boolean

  • A flag indicating the new visualization dialog should be displayed automatically when this view is presented. This setting requires startInEditMode set to true.

    Parameters

    • v: Boolean

    Returns void

Methods

_showCustomDataSourceSelection

  • Parameters

    Returns boolean

enterEditMode

  • enterEditMode(): void
  • Returns void

exitEditMode

  • exitEditMode(applyChanges: boolean): void
  • Parameters

    • applyChanges: boolean

    Returns void

getLinkedDashboardProviderAsync

  • getLinkedDashboardProviderAsync(): null | function
  • Returns null | function

maximizeVisualization

  • Used to maximize a visualization once the Reveal View was initialized and rendered. It might be used to sync the currently displayed visualization with a feature in the containing app, like displaying 'Sales by Country' along a Sales report.

    Parameters

    • visualization: RVVisualization

      the visualization to be maximized, an object obtained from the dashboard with methods like visualizations()[index] or getVisualizationByTitle(title).

      You could find the visualization you want to maximize using getById or getByTitle methods like:

      let viz = dashboard.visualizations.getByTitle("MyVizTitle")
      let viz = dashboard.visualizations.getById("TargetVizId")
      

    Returns boolean

    true if the given visualization was found in the dashboard and maximized properly, false otherwise.

minimizeVisualization

  • minimizeVisualization(): boolean
  • Used to restore the currently maximized visualization to the original state, so the whole dashboard is visible.

    Returns boolean

    true if there was a maximized visualization, which was minimized, false otherwise.

refreshDashboardData

  • refreshDashboardData(): void
  • Method used to programmatically refresh the dashboard data, equivalent to execute the 'Refresh' action in the dashboard menu.

    Returns void

refreshTheme

  • refreshTheme(): void
  • Makes sure the current theme specified in RevealSdkSettings.theme is applied. This involves re-loading of the currently displayed dashboard, so any state like pending edits, maximized visualization, filters selection changes will be reset and lost.

    Returns void

serialize

  • serialize(): Promise<Blob>
  • serialize(name: string): Promise<Blob>
  • serialize(callback: function, errorCallback: function): void
  • Serializes the current dashboard to a byte array

    Returns Promise<Blob>

  • Parameters

    • name: string

    Returns Promise<Blob>

  • Parameters

    • callback: function
        • (blob: Blob): void
        • Parameters

          • blob: Blob

          Returns void

    • errorCallback: function
        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns void

serializeWithNewName

  • serializeWithNewName(name: string): Promise<Blob>
  • serializeWithNewName(name: string, callback: function, errorCallback: function): void
  • @deprecated

    Serializes the current dashboard in an '.rdash' format to a byte array, the title of the dashboard is changed to match the specified name.

    Please use the serialize method, as this method will be removed in a future release.

    Parameters

    • name: string

    Returns Promise<Blob>

  • Parameters

    • name: string
    • callback: function
        • (blob: Blob): void
        • Parameters

          • blob: Blob

          Returns void

    • errorCallback: function
        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns void

setDateFilter

  • Sets the date filter in the current dashboard. Please note the dashboard must be defined with a date filter, otherwise this method will be ignored.

    Parameters

    Returns void

setVisualizationBackgroundColor

  • setVisualizationBackgroundColor(visualization: RVVisualization, color: string): void
  • Set the background color for the given visualization, color is specified in hex format, like "#ffffff".

    Parameters

    Returns void

setVisualizationChartSettings

toImage

  • toImage(): Promise<null | Element>
  • toImage(gotImageCallback: function): void
  • Creates a screenshot of the revealView.

    Note: This feature relies on server-side image rendering so you will need to enable in your .NET Core or Java Reveal server component.

    Returns Promise<null | Element>

  • Parameters

    • gotImageCallback: function
        • (el: null | Element): void
        • Parameters

          • el: null | Element

          Returns void

    Returns void

updateQuickFilterSelectedValues

  • updateQuickFilterSelectedValues(widget: any, fieldName: string, selectedValues: RVFilterValue[]): void
  • Parameters

    Returns void

updateSize

  • updateSize(): void
  • This method is used to indicate the size of the container has changed and RevealView must re-layout its contents.

    Returns void

Static revealViewForDashboardBlob

  • revealViewForDashboardBlob(b: Blob, selector: string): Promise<RevealView>
  • revealViewForDashboardBlob(b: Blob, selector: string, successCallback: function, errorCallback: any): void
  • This method calls RevealUtility.loadDashboardFromContainer that loads a dashboard from the Blob object with the contents of an .rdash file.

    Parameters

    • b: Blob
    • selector: string

    Returns Promise<RevealView>

  • Parameters

    • b: Blob
    • selector: string
    • successCallback: function
    • errorCallback: any

    Returns void

Static updateRevealTheme

  • Overrides built in Reveal Theme settings. This method will not affect RevealView instances already rendered.

    @deprecated

    This method is deprecated. Use RevealSdkSettings.theme property to get/set current theme.

    Parameters

    Returns void