Add Wave Analytics dashboard components to community pages to provide interactive visualizations of your data. Users can drill in and explore the dashboard within the frame on the community page or in a Wave Analytics window.
The Wave dashboard component is available in the Customer Service (Napili) template as a drag-and-drop component, however, you can also create your own Wave dashboard component using forceCommunity:waveDashboard.
Here's an example of a forceCommunity:waveDashboard component:
<aura:component implements="forceCommunity:availableForAllPageTypes"> <forceCommunity:waveDashboard dashboardId="0FKxx000000000uGAA" /> </aura:component>
Attribute Name | Attribute Type | Description | Required? |
---|---|---|---|
accessToken | String | A valid access token obtained by logging into Salesforce. Useful when the component is used by Lightning Out in a non-Salesforce domain. | |
body | Component[] | The body of the component. In markup, this is everything in the body of the tag. | |
dashboardId | String | The unique ID of the dashboard. You can get a dashboard’s ID, an 18-character code beginning with 0FK, from the dashboard's URL in Wave, or you can request it through the API. This attribute can be used instead of the developer name, but it can't be included if the name has been set. One of the two is required. | |
developerName | String | The unique developer name of the dashboard. You can request the developer name through the API. This attribute can be used instead of the dashboard ID, but it can't be included if the ID has been set. One of the two is required. | |
filter | String | Adds selections or filters to the embedded dashboard at runtime. You can filter dataset fields by variables or specified values. The filters are configured with JSON strings in this format: {'datasets' : {'dataset1': [ {'fields':['field1'], 'selection': ['!value1', '!value2']}, {'fields':['field2'], 'filter': { 'operator':'operator1', 'values': ['!value3', '!value4']}}]}}. Use this format for filtering on a measure: {'datasets' : {'dataset1': [ {'fields':['field1'], 'selection': ['!value1', '!value2']}, {'fields':['field2'], 'filter': { 'operator':'operator1', 'values':[[!value3]]}}]}}. datasets takes dataset system names which are found in the left panel of the edit page for a dataset. (If your org has namespaces, include the namespace prefix and two underscores before the dataset system name.) fields takes dimensions or measures in the dataset. To find the names, click the Explore icon to open the widget, select Show SAQL from the Options menu. values can be specific values or fields in a Salesforce object. To find the name of a field, go to Setup, locate the object you want, and select Fields. Use the Field Name (also known as the API name). For custom fields, use the name with "__c" at the end. Note that values must have the format object.field. With the selection option, the dashboard is shown with all its data, and the specified dimension values are highlighted. The selection option can be used alone or with the filter option. Selection takes dimension values only. To use this option, the dashboard must include a list, date, or toggle widget that groups by the specified dimension. With the filter option, the dashboard is shown with only filtered data. The filter option can be used alone or with the selection option. Filter takes dimension or measure values. Use operator with the filter option. Supported operators for dimensions: in; not in; matches Supported operators for measures: = ; >= ; > ; <= ; < Note: If a filter or selection is specified that does not exist, the field mapping is ignored the dashboard appears with all its data and no selection. Note: The above syntax is new in Spring ’17. The previous syntax continues to be supported, and it works the same as the new selection option. For reference, here’s the previous syntax: { 'datasetSystemName1': {'field1': ['!value1']}, 'datasetSystemName2': {'field1': ['!value1', '!value2'], 'field2': ['!value3']} } | |
height | Integer | Specifies the height of the dashboard, in pixels. | |
hideOnError | Boolean | Controls whether or not users see a dashboard that has an error. When this attribute is set to true, if the dashboard has an error, it won’t appear on the page. When set to false, the dashboard appears but doesn’t show any data except the error. An error can occur when a user doesn't have access to the dashboard or it has been deleted. | |
openLinksInNewWindow | Boolean | If false, links to other dashboards will be opened in the same window. | |
recordId | String | Id of the current entity in the context of which the component is being displayed. | |
showSharing | Boolean | If true, and the dashboard is shareable, then the dashboard shows the Share icon. If false, the dashboard doesn't show the Share icon. To show the Share icon in the dashboard, the smallest supported frame size is 800 x 612 pixels. | |
showTitle | Boolean | If true, the dashboard’s title is included above the dashboard. If false, the dashboard appears without a title. |