Attributes for the Lightning Web Component for Analytics Dashboards

The Lightning web component for CRM Analytics dashboards has attributes that can be set programmatically so you can create, render, and interact with a CRM Analytics dashboard on a page at runtime.

NameTypeRequired or OptionalDescription
accessTokenstringOptionalA valid access token is obtained by logging into Salesforce. This is useful when the dashboard is used by Lightning Out in a non-Salesforce domain.
contextstringOptionalThe context for the dashboard.
dashboardstringRequired if developerName isn’t specified.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, or you can request it through the API. This attribute can be used instead of the developerName, but it can't be included if the name has been set. Either the developerName or the dashboard attribute is required.
dashboardExtendedMetadataobjectOptionalThe extended metadata for the dashboard.
dashboardMetadataobjectOptionalThe metadata for the dashboard.
developerNamestringRequired if dashboard isn’t specified.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. Either the developerName or the dashboard attribute is required.
enableNotificationsbooleanOptionalIndicates whether users can set and manage notifications on widgets (true) or not (false). The default is false.
enableSubscriptionsbooleanOptionalIndicates whether users can subscribe to widgets and manage their subscriptions (true) or not (false). The default is false.
heightintegerOptionalSpecifies the height of the dashboard in pixels. The default is 300.
hideOnErrorbooleanOptionalIndicates whether users see a dashboard that has an error (true) or not (false). When this attribute is set to true, if the dashboard has an error it doesn't appear on the page. When set to false, the dashboard appears but doesn’t show any data. An error can occur when a user doesn't have access to the dashboard or it has been deleted. The default is false.
isLoadedbooleanOptionalIndicates whether the dashboard is fully loaded on the page (true) or not (false). The default is false.
openLocationstringOptionalSpecifies where the dashboard opens if the user chooses to launch the dashboard in its own page.
pageIdstringOptionalIf provided, this sets the initial dashboard page.
recordIdstringOptionalThe ID of the current entity in the context of which the dashboard is being displayed.
showHeaderbooleanOptionalIndicates whether the dashboard displays a header bar that includes dashboard information and controls (true) or not (false). The header bar automatically appears when either showSharing or showTitle is true. The default is false.
showSharingbooleanOptionalIndicates whether to show the Share icon for a dashboard (true) or not (false). If true and the dashboard is shareable, then the dashboard shows the Share icon. To show the Share icon in the dashboard, the smallest supported frame size is 800 x 612 pixels. The default is false.
showTitlebooleanOptionalIndicates whether to show the dashboard's title above the dashboard (true) or not (false). The default is false.
statestringOptionalThe state of the dashboard. This includes any filters or selections that have been applied.
widthintegerOptionalSpecifies the width of the dashboard in pixels.

Here’s an example of a CRM Analytics dashboard component with most of the attributes specified. This example shows custom values overriding the default values.