<?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 Re: d3 v4 and selectionManager in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/d3-v4-and-selectionManager/m-p/420134#M12560</link>
    <description>&lt;P&gt;Hi Ignat,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;works fine for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Thank you very much!&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For everyone who has the same issue&lt;STRONG&gt; follow these steps:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. STEP:&lt;/STRONG&gt; Change the selection datatype to the new d3 v4 format to something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;private chartSelection: &lt;STRONG&gt;d3.Selection&amp;lt;d3.BaseType, ChartDataPoint, d3.BaseType, any&amp;gt;&lt;/STRONG&gt;; // Needed to display datapoints
private svg: &lt;STRONG&gt;d3.Selection&amp;lt;SVGElement, {}, HTMLElement, any&amp;gt;&lt;/STRONG&gt;; // SVG-Element (Container)
private g: &lt;STRONG&gt;d3.Selection&amp;lt;SVGElement, {}, HTMLElement, any&amp;gt;&lt;/STRONG&gt;; // SVG-Element (group 'g')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. STEP:&lt;/STRONG&gt; Add &lt;STRONG&gt;&amp;lt;SVGElement&amp;gt;&lt;/STRONG&gt; when calling the constructor:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;constructor(options: VisualConstructorOptions) {
			
            this.host = options.host;

            this.selectionManager = options.host.createSelectionManager();
            this.selectionManager.registerOnSelectCallback(() =&amp;gt; {
                this.syncSelectionState(this.chartSelection, this.selectionManager.getSelectionIds() as ISelectionId[]);
            });

           
            this.svg = d3.select(options.element).append&lt;STRONG&gt;&amp;lt;SVGElement&amp;gt;&lt;/STRONG&gt;('svg');
	    this.g = this.svg.append&lt;STRONG&gt;&amp;lt;SVGElement&amp;gt;&lt;/STRONG&gt;('g');
            
}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;3. STEP:&lt;/STRONG&gt; When creating the datapoints, you have to add the &lt;STRONG&gt;d3 event directly to it&lt;/STRONG&gt;. That means if your code look something similar like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            // Create a SVG-Element (datapoints)
            this.chartSelection = this.g
	         .append('g')
                 .selectAll('.dot')
                 .data(viewModel.dataPoints);

            this.chartSelection
                .enter()
                .append('circle')
                .attr('r', 5)
                .merge(this.chartSelection)
                .classed('dot', true)
                .attr('cx', d =&amp;gt; x(&amp;lt;number&amp;gt;d.gesamtKosten))
                .attr('cy', d =&amp;gt; y(&amp;lt;number&amp;gt;d.anzahlKostenstellen))
                .attr('fill', d =&amp;gt; d.color);

this.syncSelectionState(
                this.chartSelection,
                this.selectionManager.getSelectionIds() as ISelectionId[]
            );

            this.chartSelection.on('click', (d) =&amp;gt; {
                // Allow selection only if the visual is rendered in a view that supports interactivity (e.g. Report)
                if (this.host.allowInteractions) {
                    const isCrtlPressed: boolean = (d3.event as MouseEvent).ctrlKey;
                    this.selectionManager
                        .select(d.selectionId, isCrtlPressed)
                        .then((ids: ISelectionId[]) =&amp;gt; {
                            this.syncSelectionState(this.chartSelection, ids);
                        });

                    (&amp;lt;Event&amp;gt;d3.event).stopPropagation();
                }
            });

            this.chartSelection
                .exit()
                .remove();

            // Clear selection when clicking outside a dot
            this.svg.on('click', (d) =&amp;gt; {
                if (this.host.allowInteractions) {
                    this.selectionManager
                        .clear()
                        .then(() =&amp;gt; {
                            this.syncSelectionState(this.chartSelection, []);
                        });
                }
            });&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Change it to this:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                 // Create a SVG-Element (datapoints)
	         this.chartSelection = this.g
		     .append('g')
                     .selectAll('.dot')
                     .data(viewModel.dataPoints);

                this.chartSelection
                     .enter()
                     .append('circle')
                     &lt;EM&gt;.on('click', (d) =&amp;gt; {
                       // Allow selection only if the visual is rendered in a view that supports interactivity (e.g. Report)
                       if (this.host.allowInteractions) {
                        const isCrtlPressed: boolean = (d3.event as MouseEvent).ctrlKey;
                        this.selectionManager
                            .select(d.selectionId, isCrtlPressed)
                            .then((ids: ISelectionId[]) =&amp;gt; {
                                this.syncSelectionState(this.g.&lt;STRONG&gt;selectAll(".dot")&lt;/STRONG&gt;, ids);
                            });
    
                        (&amp;lt;Event&amp;gt;d3.event).stopPropagation();
                    }
                })&lt;/EM&gt;
                .attr('r', 5)
                .merge(this.chartSelection)
                .classed('dot', true)
                .attr('cx', d =&amp;gt; x(&amp;lt;number&amp;gt;d.gesamtKosten))
                .attr('cy', d =&amp;gt; y(&amp;lt;number&amp;gt;d.anzahlKostenstellen))
                .attr('fill', d =&amp;gt; d.color);&lt;BR /&gt;
            this.syncSelectionState(
                this.g.&lt;STRONG&gt;selectAll(".dot"),&lt;/STRONG&gt;
                this.selectionManager.getSelectionIds() as ISelectionId[]
            );


            this.chartSelection
                .exit()
                .remove();

            // Clear selection when clicking outside a dot
            this.svg.on('click', (d) =&amp;gt; {
                if (this.host.allowInteractions) {
                    this.selectionManager
                        .clear()
                        .then(() =&amp;gt; {
                            this.syncSelectionState(this.chartSelection, []);
                        });
                }
            });&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;4. STEP:&lt;/STRONG&gt; Edit the syncSelectionState():&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;private syncSelectionState(
		
            selection: &lt;STRONG&gt;d3.Selection&amp;lt;d3.BaseType, any, d3.BaseType, any&amp;gt;&lt;/STRONG&gt;,
            selectionIds: ISelectionId[]
			
): void { ... }&lt;/PRE&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
    <pubDate>Thu, 17 May 2018 20:05:00 GMT</pubDate>
    <dc:creator>az2451</dc:creator>
    <dc:date>2018-05-17T20:05:00Z</dc:date>
    <item>
      <title>d3 v4 and selectionManager</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/d3-v4-and-selectionManager/m-p/415381#M12367</link>
      <description>&lt;P&gt;I have updated my d3 library from v3 to v5 (d3@5.3.0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now im facing the consequences &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got everything working except for &lt;STRONG&gt;d3.selection&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In the v3&amp;nbsp;this was the correct way to spell it:&lt;/P&gt;&lt;PRE&gt;private chartSelection: &lt;STRONG&gt;d3.selection.Update&amp;lt;ChartDataPoint&amp;gt;;&lt;/STRONG&gt;
private svg: &lt;STRONG&gt;d3.Selection&amp;lt;SVGElement&amp;gt;;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;But now&amp;nbsp;since v4 it wants even more than that (by sudden, it wants &lt;STRONG&gt;4 arguments&lt;/STRONG&gt;!!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check it out:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Generic type '&lt;STRONG&gt;Selection&amp;lt;GElement, Datum, PElement, PDatum&amp;gt;&lt;/STRONG&gt;'&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* The first generic "&lt;STRONG&gt;GElement&lt;/STRONG&gt;" refers to the type of the selected element(s). &lt;BR /&gt;The second generic "&lt;STRONG&gt;Datum&lt;/STRONG&gt;" refers to the type of the datum of a selected element(s). &lt;BR /&gt;The third generic "&lt;STRONG&gt;PElement&lt;/STRONG&gt;" refers to the type of the parent element(s) in the D3 selection. &lt;BR /&gt;The fourth generic "&lt;STRONG&gt;PDatum&lt;/STRONG&gt;" refers to the type of the datum of the parent element(s). &lt;BR /&gt;A D3 Selection of elements. */&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I dont get it how to use this masterpiece&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone can help me here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 13:37:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/d3-v4-and-selectionManager/m-p/415381#M12367</guid>
      <dc:creator>az2451</dc:creator>
      <dc:date>2018-05-16T13:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: d3 v5 makes my life difficult</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/d3-v4-and-selectionManager/m-p/416368#M12396</link>
      <description>&lt;P&gt;We'd recommned to ask developer of d3 or d3 types about this issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;&lt;SPAN&gt;pbicvsupport@microsoft.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 07:27:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/d3-v4-and-selectionManager/m-p/416368#M12396</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-05-14T07:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: d3 v4 and selectionManager</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/d3-v4-and-selectionManager/m-p/418762#M12491</link>
      <description>&lt;P&gt;Alright, i have found out how d3 selections work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;private chartSelection: d3.Selection&amp;lt;d3.BaseType, ChartDataPoint, d3.BaseType, any&amp;gt;;
private svg: d3.Selection&amp;lt;SVGElement, {}, HTMLElement, any&amp;gt;;
private g: d3.Selection&amp;lt;SVGElement, {}, HTMLElement, any&amp;gt;;&lt;/PRE&gt;&lt;P&gt;But the problem seems to be something else because the &lt;STRONG&gt;syncSelectionState(): void&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;dont work (no Errors are shown). That means i can not click on a specific datapoint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It also seems to be that by installing the newest version of d3 (&lt;EM&gt;d3@5.3.0 @types/d3@3.5.40&lt;/EM&gt;) it also installed a different version of typescript (there is are new typescript folder in my node_modules). So the syntax changed a bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;//For e.g. instead of&lt;/STRONG&gt; 

this.svg.attr({
   width: width,
   height: height
});

&lt;STRONG&gt;//I now have to write it like this:&lt;/STRONG&gt;

this.svg
   .attr('width', width)
   .attr('height', height);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the selectionIds actually &lt;STRONG&gt;exist&lt;/STRONG&gt; for each datapoint (I can for e.g. change the color of each datapoint over formatting options)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;this.datapoint.selectionId.getSelector()&lt;/PRE&gt;&lt;P&gt;I cant understand why the &lt;STRONG&gt;selectionManager&lt;/STRONG&gt; wont work, where it should be working now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my whole code for download:&amp;nbsp;&lt;A href="https://drive.google.com/open?id=1JAVHVRQYvoQow0nqrQa0IQ8CsNzhQU5h" target="_self"&gt;MyGoogleDrive&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there someone who is also using d3 v4&amp;nbsp; and managed to get selectionManager working?&lt;/P&gt;&lt;P&gt;I would be very thankful!&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 14:28:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/d3-v4-and-selectionManager/m-p/418762#M12491</guid>
      <dc:creator>az2451</dc:creator>
      <dc:date>2018-05-16T14:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: d3 v4 and selectionManager</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/d3-v4-and-selectionManager/m-p/419623#M12529</link>
      <description>&lt;P&gt;It seems d3v4 handles selections in a different they in comparison to d3v3.&lt;/P&gt;&lt;P&gt;We'd recommend to take a look at &lt;A href="https://1drv.ms/u/s!As9ZTdAyQtTDiRrcFIaEbvwB3T7O" target="_blank"&gt;this fixed version&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ignat Vilesov,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;&lt;SPAN&gt;pbicvsupport@microsoft.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 11:01:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/d3-v4-and-selectionManager/m-p/419623#M12529</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-05-17T11:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: d3 v4 and selectionManager</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/d3-v4-and-selectionManager/m-p/420134#M12560</link>
      <description>&lt;P&gt;Hi Ignat,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;works fine for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Thank you very much!&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For everyone who has the same issue&lt;STRONG&gt; follow these steps:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. STEP:&lt;/STRONG&gt; Change the selection datatype to the new d3 v4 format to something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;private chartSelection: &lt;STRONG&gt;d3.Selection&amp;lt;d3.BaseType, ChartDataPoint, d3.BaseType, any&amp;gt;&lt;/STRONG&gt;; // Needed to display datapoints
private svg: &lt;STRONG&gt;d3.Selection&amp;lt;SVGElement, {}, HTMLElement, any&amp;gt;&lt;/STRONG&gt;; // SVG-Element (Container)
private g: &lt;STRONG&gt;d3.Selection&amp;lt;SVGElement, {}, HTMLElement, any&amp;gt;&lt;/STRONG&gt;; // SVG-Element (group 'g')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. STEP:&lt;/STRONG&gt; Add &lt;STRONG&gt;&amp;lt;SVGElement&amp;gt;&lt;/STRONG&gt; when calling the constructor:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;constructor(options: VisualConstructorOptions) {
			
            this.host = options.host;

            this.selectionManager = options.host.createSelectionManager();
            this.selectionManager.registerOnSelectCallback(() =&amp;gt; {
                this.syncSelectionState(this.chartSelection, this.selectionManager.getSelectionIds() as ISelectionId[]);
            });

           
            this.svg = d3.select(options.element).append&lt;STRONG&gt;&amp;lt;SVGElement&amp;gt;&lt;/STRONG&gt;('svg');
	    this.g = this.svg.append&lt;STRONG&gt;&amp;lt;SVGElement&amp;gt;&lt;/STRONG&gt;('g');
            
}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;3. STEP:&lt;/STRONG&gt; When creating the datapoints, you have to add the &lt;STRONG&gt;d3 event directly to it&lt;/STRONG&gt;. That means if your code look something similar like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            // Create a SVG-Element (datapoints)
            this.chartSelection = this.g
	         .append('g')
                 .selectAll('.dot')
                 .data(viewModel.dataPoints);

            this.chartSelection
                .enter()
                .append('circle')
                .attr('r', 5)
                .merge(this.chartSelection)
                .classed('dot', true)
                .attr('cx', d =&amp;gt; x(&amp;lt;number&amp;gt;d.gesamtKosten))
                .attr('cy', d =&amp;gt; y(&amp;lt;number&amp;gt;d.anzahlKostenstellen))
                .attr('fill', d =&amp;gt; d.color);

this.syncSelectionState(
                this.chartSelection,
                this.selectionManager.getSelectionIds() as ISelectionId[]
            );

            this.chartSelection.on('click', (d) =&amp;gt; {
                // Allow selection only if the visual is rendered in a view that supports interactivity (e.g. Report)
                if (this.host.allowInteractions) {
                    const isCrtlPressed: boolean = (d3.event as MouseEvent).ctrlKey;
                    this.selectionManager
                        .select(d.selectionId, isCrtlPressed)
                        .then((ids: ISelectionId[]) =&amp;gt; {
                            this.syncSelectionState(this.chartSelection, ids);
                        });

                    (&amp;lt;Event&amp;gt;d3.event).stopPropagation();
                }
            });

            this.chartSelection
                .exit()
                .remove();

            // Clear selection when clicking outside a dot
            this.svg.on('click', (d) =&amp;gt; {
                if (this.host.allowInteractions) {
                    this.selectionManager
                        .clear()
                        .then(() =&amp;gt; {
                            this.syncSelectionState(this.chartSelection, []);
                        });
                }
            });&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Change it to this:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                 // Create a SVG-Element (datapoints)
	         this.chartSelection = this.g
		     .append('g')
                     .selectAll('.dot')
                     .data(viewModel.dataPoints);

                this.chartSelection
                     .enter()
                     .append('circle')
                     &lt;EM&gt;.on('click', (d) =&amp;gt; {
                       // Allow selection only if the visual is rendered in a view that supports interactivity (e.g. Report)
                       if (this.host.allowInteractions) {
                        const isCrtlPressed: boolean = (d3.event as MouseEvent).ctrlKey;
                        this.selectionManager
                            .select(d.selectionId, isCrtlPressed)
                            .then((ids: ISelectionId[]) =&amp;gt; {
                                this.syncSelectionState(this.g.&lt;STRONG&gt;selectAll(".dot")&lt;/STRONG&gt;, ids);
                            });
    
                        (&amp;lt;Event&amp;gt;d3.event).stopPropagation();
                    }
                })&lt;/EM&gt;
                .attr('r', 5)
                .merge(this.chartSelection)
                .classed('dot', true)
                .attr('cx', d =&amp;gt; x(&amp;lt;number&amp;gt;d.gesamtKosten))
                .attr('cy', d =&amp;gt; y(&amp;lt;number&amp;gt;d.anzahlKostenstellen))
                .attr('fill', d =&amp;gt; d.color);&lt;BR /&gt;
            this.syncSelectionState(
                this.g.&lt;STRONG&gt;selectAll(".dot"),&lt;/STRONG&gt;
                this.selectionManager.getSelectionIds() as ISelectionId[]
            );


            this.chartSelection
                .exit()
                .remove();

            // Clear selection when clicking outside a dot
            this.svg.on('click', (d) =&amp;gt; {
                if (this.host.allowInteractions) {
                    this.selectionManager
                        .clear()
                        .then(() =&amp;gt; {
                            this.syncSelectionState(this.chartSelection, []);
                        });
                }
            });&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;4. STEP:&lt;/STRONG&gt; Edit the syncSelectionState():&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;private syncSelectionState(
		
            selection: &lt;STRONG&gt;d3.Selection&amp;lt;d3.BaseType, any, d3.BaseType, any&amp;gt;&lt;/STRONG&gt;,
            selectionIds: ISelectionId[]
			
): void { ... }&lt;/PRE&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 20:05:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/d3-v4-and-selectionManager/m-p/420134#M12560</guid>
      <dc:creator>az2451</dc:creator>
      <dc:date>2018-05-17T20:05:00Z</dc:date>
    </item>
  </channel>
</rss>

