<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Javascript SDK - Catch multiple data selected events across multiple charts in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-SDK-Catch-multiple-data-selected-events-across/m-p/415421#M12368</link>
    <description>&lt;P&gt;I have an embedded report with multiple charts. It's possible to select multiple data points &lt;STRONG&gt;accros multiple&lt;/STRONG&gt; charts using Ctrl+click. I would like to catch such multiple data selected events using the javascript SDK. When adding an event listener "dataSelected" I can just catch the &lt;STRONG&gt;latest&lt;/STRONG&gt; data selected event, not the &lt;STRONG&gt;multiple&lt;/STRONG&gt; data selected events. I can catch multiple data selected events in one single chart but not accros multiple charts.&amp;nbsp;Is there a way to do&amp;nbsp;it ?&lt;/P&gt;</description>
    <pubDate>Fri, 11 May 2018 11:29:06 GMT</pubDate>
    <dc:creator>momo</dc:creator>
    <dc:date>2018-05-11T11:29:06Z</dc:date>
    <item>
      <title>Javascript SDK - Catch multiple data selected events across multiple charts</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-SDK-Catch-multiple-data-selected-events-across/m-p/415421#M12368</link>
      <description>&lt;P&gt;I have an embedded report with multiple charts. It's possible to select multiple data points &lt;STRONG&gt;accros multiple&lt;/STRONG&gt; charts using Ctrl+click. I would like to catch such multiple data selected events using the javascript SDK. When adding an event listener "dataSelected" I can just catch the &lt;STRONG&gt;latest&lt;/STRONG&gt; data selected event, not the &lt;STRONG&gt;multiple&lt;/STRONG&gt; data selected events. I can catch multiple data selected events in one single chart but not accros multiple charts.&amp;nbsp;Is there a way to do&amp;nbsp;it ?&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 11:29:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-SDK-Catch-multiple-data-selected-events-across/m-p/415421#M12368</guid>
      <dc:creator>momo</dc:creator>
      <dc:date>2018-05-11T11:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript SDK - Catch multiple data selected events across multiple charts</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-SDK-Catch-multiple-data-selected-events-across/m-p/415847#M12384</link>
      <description>&lt;P&gt;How you define the DataSelected Events here?&lt;/P&gt;&lt;P&gt;If you would like to get the history data, then you may need to create an array to hold the data selected previously.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe the DataSelected Event captures every click, but in your code it only returns the last Event information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may consider add a log function similar to the Power BI Embed sample, which would log every steps with user&amp;nbsp;interaction.&lt;/P&gt;&lt;P&gt;Code example:&lt;/P&gt;&lt;PRE&gt;// Get a reference to the embedded report HTML element
var embedContainer = $('#embedContainer')[0];
 
// Get a reference to the embedded report.
report = powerbi.get(embedContainer);
 
// Report.off removes a given event listener if it exists.
report.off("dataSelected");
 
// Report.on will add an event listener.
report.on("dataSelected", function(event) {
    var data = event.detail;
    &lt;STRONG&gt;Log.log(data);&lt;/STRONG&gt;
});
 
// Select Run and select an element of a visualization.
// For example, a bar in a bar chart. You should see an entry in the Log window.
 
Log.logText("Select data to see events in Log window.");&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Sat, 12 May 2018 08:01:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-SDK-Catch-multiple-data-selected-events-across/m-p/415847#M12384</guid>
      <dc:creator>v-micsh-msft</dc:creator>
      <dc:date>2018-05-12T08:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript SDK - Catch multiple data selected events across multiple charts</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-SDK-Catch-multiple-data-selected-events-across/m-p/417579#M12420</link>
      <description>&lt;P&gt;Thank you Michael for your answer!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I catch all the DataSelected events using code similar to the Power BI sample. I can store the full events history but this doesn't help me as I don't know if it was a simple click or a ctrl-click which throw the event. With a simple click, only the last data point is selected. But with a ctrl-click, multiple data points are selected (with AND logic between data points on different charts. This is visible graphically on the embedded report).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I compared the JSON returned in events and could see no differences between a click event and a ctrl-click event (on multiple charts).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;François&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 09:43:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-SDK-Catch-multiple-data-selected-events-across/m-p/417579#M12420</guid>
      <dc:creator>momo</dc:creator>
      <dc:date>2018-05-15T09:43:06Z</dc:date>
    </item>
    <item>
      <title>Javascript SDK - Catch multiple data selected events across multiple charts</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-SDK-Catch-multiple-data-selected-events-across/m-p/417800#M12525</link>
      <description>&lt;P&gt;&lt;SPAN&gt;On embedded report with multiple charts, it's possible, since February 2018 release, to select multiple data points&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;accros multiple&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;charts using &lt;STRONG&gt;Ctrl+click&lt;/STRONG&gt;.&amp;nbsp;It should be possible to catch such multiple data selected events using the javascript SDK&amp;nbsp;by adding an event listener "dataSelected"&lt;/SPAN&gt;&lt;SPAN&gt;. Unfortunately, it seems it's not the case today.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 14:02:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-SDK-Catch-multiple-data-selected-events-across/m-p/417800#M12525</guid>
      <dc:creator>momo</dc:creator>
      <dc:date>2018-05-15T14:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript SDK - Catch multiple data selected events across multiple charts</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-SDK-Catch-multiple-data-selected-events-across/m-p/1973441#M30651</link>
      <description>&lt;P&gt;I'm also interested in this, but do not see a solution.. has any been found?&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 13:27:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-SDK-Catch-multiple-data-selected-events-across/m-p/1973441#M30651</guid>
      <dc:creator>dmarkham</dc:creator>
      <dc:date>2021-07-22T13:27:25Z</dc:date>
    </item>
  </channel>
</rss>

