My gut instinct is to use Analytics SDK, but a cursory glance doesn't reveal it.

Is it possible for Analytics Dashboards to embed Lightning Components, iFrames, or Connected Apps, or conversely for Analytics Dashboards to communicate information about the user's interaction out to a Lightning Component?

The use case is:

I have a React App that I have embedded in a Lightning Container, but I want to be able to manipulate the React App based on the user's selection in an Analytics Dashboard.

I know it's possible to trigger elements within a dashboard to interact with one another, and when the dashboard is embedded on a page, filter the results based on the lightning page it's embedded in, but curious if there is an API to react (no pun intended) to user's interactions in the dashboard?


Functionally the Analytics SDK (Linked above) is nearly what I need, and I may be still discovering.

More specifically the SelectionChanged Event can capture information when the selection is "changed" from within an Analytics Dashboard. That being said after I have attached the event and set it to listen for this event being fired from a dashboard I created, it only seems to fire when I change dashboard lenses that contain different steps

Ideally, I would like to be able to manipulate the dashboard, have a "Table Mode" representation of the data, and when a row is selected in that table I can capture the data from that "table row":

Flow Chart:


Starting bounty for:

  1. Source Code or explanation/demonstration: capturing of Dashboard Lens Table Mode row-data after clicking in Analytics Web SDK SelectionChanged Event. This is Step 1/2 in Flow-chart.

Disclaimer: I am not an expert in Einstein Analytics and the answer below is based on my limited experience while doing Trailhead on this topic and further test related to this question.

I have also posted this idea based on the findings below to allow the event to be triggered based on row selection instead of selecting a cell of Measure column type.

Based on a test, it seems that the wave:selectionChanged is triggered from a table only when you have a Measure dataset field added as a Column to the Table and that you select that particular cell in the Table. It does not respond to any other column added in the table. So as long as you have a Measure field, you will be able to listen to the wave:selectionChanged event.

Once I added the Analytics Dashboard to a Lightning App page and added the Aura Component (the code for the listener is same as found on the documentation here) to listen to the events on the page, I was able to handle the event and get the values from that particular row from the Table.

Below is the sequence of screenshots as how I was able to listen to the event from a sample dashboard which had a chart and table components added to it. In my test, the Measure fields added to the Table were Sum of Amount and Count of Rows and selecting any cell value for these two columns fired the event.

enter image description here

  • 1
    Great find @Jayant Das! The array of data that is passed is exactly what I need, though it is certainly strange IMOP that it would only be triggered when selecting a Measure Column, and the "Group By" columns you have to use to display other row data (dimensions) are kind of useless, at least in this context. May 22 '19 at 5:16
  • 1
    @jordan.baucke Glad that it provided you a direction. More than to be able to answer this, I definitely learned here. But you are right, I think that's odd that the event is triggered from a specific column and not others. I have opened an idea on this to allow this event to be triggered from a row selection independent of any column type. I have updated this in the answer for visibility.
    – Jayant Das
    May 22 '19 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.