<?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 Adding Selection To Custom Visual in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Adding-Selection-To-Custom-Visual/m-p/4262860#M58069</link>
    <description>&lt;P&gt;I have a custom visual I am working on where I am building out a map with leaflet &amp;amp; trying to add in the ability to click on the map and have it filter the other visual on the page.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am looking at the following docs&lt;BR /&gt;&lt;A href="https://github.com/PowerBi-Projects/PowerBI-visuals/blob/master/Visual/Selection.md" target="_blank"&gt;https://github.com/PowerBi-Projects/PowerBI-visuals/blob/master/Visual/Selection.md&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/selection-api" target="_blank"&gt;https://learn.microsoft.com/en-us/power-bi/developer/visuals/selection-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Whjen I try to add this&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;categorySelectionId&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;host&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;createSelectionIdBuilder&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;into either my update or constructor for my visual I get the error&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Property 'createSelectionIdBuilder' does not exist on type 'IVisualHost'.&lt;/PRE&gt;&lt;P&gt;I am running&amp;nbsp; powerbi-visuals-tools version - 5.5.1 and have the following versions&amp;nbsp; in package.json&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"powerbi-visuals-api"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"~5.3.0"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"powerbi-visuals-utils-dataviewutils"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"^6.1.0"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"powerbi-visuals-utils-formattingmodel"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"6.0.0"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"powerbi-visuals-utils-interactivityutils"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"^6.0.4"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;What am I doing wrong here?&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 29 Oct 2024 19:37:57 GMT</pubDate>
    <dc:creator>Grzy7316</dc:creator>
    <dc:date>2024-10-29T19:37:57Z</dc:date>
    <item>
      <title>Adding Selection To Custom Visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-Selection-To-Custom-Visual/m-p/4262860#M58069</link>
      <description>&lt;P&gt;I have a custom visual I am working on where I am building out a map with leaflet &amp;amp; trying to add in the ability to click on the map and have it filter the other visual on the page.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am looking at the following docs&lt;BR /&gt;&lt;A href="https://github.com/PowerBi-Projects/PowerBI-visuals/blob/master/Visual/Selection.md" target="_blank"&gt;https://github.com/PowerBi-Projects/PowerBI-visuals/blob/master/Visual/Selection.md&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/selection-api" target="_blank"&gt;https://learn.microsoft.com/en-us/power-bi/developer/visuals/selection-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Whjen I try to add this&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;categorySelectionId&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;host&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;createSelectionIdBuilder&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;into either my update or constructor for my visual I get the error&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Property 'createSelectionIdBuilder' does not exist on type 'IVisualHost'.&lt;/PRE&gt;&lt;P&gt;I am running&amp;nbsp; powerbi-visuals-tools version - 5.5.1 and have the following versions&amp;nbsp; in package.json&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"powerbi-visuals-api"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"~5.3.0"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"powerbi-visuals-utils-dataviewutils"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"^6.1.0"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"powerbi-visuals-utils-formattingmodel"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"6.0.0"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"powerbi-visuals-utils-interactivityutils"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"^6.0.4"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;What am I doing wrong here?&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 29 Oct 2024 19:37:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-Selection-To-Custom-Visual/m-p/4262860#M58069</guid>
      <dc:creator>Grzy7316</dc:creator>
      <dc:date>2024-10-29T19:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Selection To Custom Visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-Selection-To-Custom-Visual/m-p/4263424#M58077</link>
      <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Hi,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/338109"&gt;@Grzy7316&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;1.&lt;/SPAN&gt;&lt;SPAN&gt;Firstly, have you correctly imported the relevant variables&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;import IVisual = powerbi.extensibility.IVisual;
import IVisualHost = powerbi.extensibility.visual.IVisualHost;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;2.&lt;/SPAN&gt;&lt;SPAN&gt;Secondly, I recommend checking whether you have created class properties for both the host and the selection manager.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;private host: IVisualHost;
private selectionManager: ISelectionManager;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;For further details, please refer to:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vlinyulumsft_0-1730273854250.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1191596iF50451DEC18652F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vlinyulumsft_0-1730273854250.png" alt="vlinyulumsft_0-1730273854250.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="zh-CN"&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/selection-api#create-an-instance-of-the-selection-manager" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/power-bi/developer/visuals/selection-api#create-an-instance-of-the-selection-manager&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;3.&lt;/SPAN&gt;&lt;SPAN&gt;Next, please refer to the following code for the IVisualHost interface services:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;export interface IVisualHost extends extensibility.IVisualHost {
        createSelectionIdBuilder: () =&amp;gt; visuals.ISelectionIdBuilder;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vlinyulumsft_1-1730273938327.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1191597i7451D0D363C3B44D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vlinyulumsft_1-1730273938327.png" alt="vlinyulumsft_1-1730273938327.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;For further details, please refer to:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://github.com/microsoft/powerbi-visuals-api/blob/main/src/visuals-api.d.ts#L1783C9-L1783C25" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;powerbi-visuals-api/src/visuals-api.d.ts at main · microsoft/powerbi-visuals-api · GitHub&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/visual-api" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Visual API for Power BI Visuals - Power BI | Microsoft Learn&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" lang="zh-CN"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;4.&lt;/SPAN&gt;&lt;SPAN&gt;Here are some relevant example links that I hope will be helpful to you:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://github.com/microsoft/PowerBI-visuals-sampleBarChart/blob/main/src/barChart.ts" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;PowerBI-visuals-sampleBarChart/src/barChart.ts at main · microsoft/PowerBI-visuals-sampleBarChart · GitHub&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;A href="https://outcompute.com/2017/09/11/adding-interactions-to-your-power-bi-custom-visual/" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Adding Interactions To Your Power BI Custom Visual&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Visuals-interactions/m-p/1618141" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Solved: Visuals interactions - Microsoft Fabric Community&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Leroy Lu&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider Accept it &lt;EM&gt;&lt;STRONG&gt;as the solution &lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 07:40:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-Selection-To-Custom-Visual/m-p/4263424#M58077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-30T07:40:18Z</dc:date>
    </item>
  </channel>
</rss>

