<?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: Custom tooltip - Uncaught TypeError: Cannot read properties of null (reading 'hasIdentity') in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-tooltip-Uncaught-TypeError-Cannot-read-properties-of-null/m-p/2239038#M33447</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="345549" data-lia-user-login="janstrbik" class="lia-mention lia-mention-user"&gt;janstrbik&lt;/a&gt;,&amp;nbsp;and thanks so much for providing a complete repo - super easy to start having a look around &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The "issue" is on &lt;A href="https://github.com/janstrbik/PowerBI-custom-visual-tooltip/blob/main/src/visual.ts#L51" target="_self"&gt;line 51&lt;/A&gt;, where you are passing the third parameter (selector):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;    private renderTooltip() {
        this.tooltipServiceWrapper.addTooltip(
            d3.select(this.target),
            (tooltipEvent: tooltip.TooltipEventArgs&amp;lt;number&amp;gt;) =&amp;gt; this.getTooltipData(),
            (tooltipEvent: tooltip.TooltipEventArgs&amp;lt;number&amp;gt;) =&amp;gt; null); /** &amp;lt;--- right here */
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify this to an empty array, e.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;    private renderTooltip() {
        this.tooltipServiceWrapper.addTooltip(
            d3.select(this.target),
            (tooltipEvent: tooltip.TooltipEventArgs&amp;lt;number&amp;gt;) =&amp;gt; this.getTooltipData(),
            (tooltipEvent: tooltip.TooltipEventArgs&amp;lt;number&amp;gt;) =&amp;gt; []); /** &amp;lt;--- right here */
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will now work as expected, e.g.:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Based on the typings, I think your approach is correct and there is an issue in the utilities somewhere (based on what looks like &lt;A href="https://github.com/microsoft/powerbi-visuals-utils-tooltiputils/pull/45/files" target="_self"&gt;changes made to explicitly remove this restriction in the repo a while back&lt;/A&gt;.) This should apparently not need to be an array - report page tooltips only support a single selector.&lt;/P&gt;
&lt;P&gt;I don't personally use this package in my projects (I usually use the visual host directly) so haven't come across this issue - you might want to raise this as an issue in the repo for the team to look at or provide an official response (giving them a link to your repo as a means of reproducing; it's quite clear in helping to illustrate what I think is incorrect here).&lt;/P&gt;
&lt;P&gt;Either way, the above resolution should get you moving. If you do get to the point of passing in a selection ID for a report page tooltip here, I assume this would also need to be a single element array, so bear this in mind if/when you get there.&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Dec 2021 22:11:53 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2021-12-14T22:11:53Z</dc:date>
    <item>
      <title>Custom tooltip - Uncaught TypeError: Cannot read properties of null (reading 'hasIdentity')</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-tooltip-Uncaught-TypeError-Cannot-read-properties-of-null/m-p/2237503#M33436</link>
      <description>&lt;P&gt;I am developing custom simple visual where I would like to use built-in tooltips, I integrated it by documentation steps, but I am getting console error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;what is pointing to customVisualHost bundle where it looks like event is null in this method&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;and I have no clue what am I doing wrong. I prepared separate repository just with tooltip functionality.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/janstrbik/PowerBI-custom-visual-tooltip" target="_self"&gt;https://github.com/janstrbik/PowerBI-custom-visual-tooltip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me out here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks. Jan&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 08:59:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-tooltip-Uncaught-TypeError-Cannot-read-properties-of-null/m-p/2237503#M33436</guid>
      <dc:creator>janstrbik</dc:creator>
      <dc:date>2021-12-14T08:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom tooltip - Uncaught TypeError: Cannot read properties of null (reading 'hasIdentity')</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-tooltip-Uncaught-TypeError-Cannot-read-properties-of-null/m-p/2239038#M33447</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="345549" data-lia-user-login="janstrbik" class="lia-mention lia-mention-user"&gt;janstrbik&lt;/a&gt;,&amp;nbsp;and thanks so much for providing a complete repo - super easy to start having a look around &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The "issue" is on &lt;A href="https://github.com/janstrbik/PowerBI-custom-visual-tooltip/blob/main/src/visual.ts#L51" target="_self"&gt;line 51&lt;/A&gt;, where you are passing the third parameter (selector):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;    private renderTooltip() {
        this.tooltipServiceWrapper.addTooltip(
            d3.select(this.target),
            (tooltipEvent: tooltip.TooltipEventArgs&amp;lt;number&amp;gt;) =&amp;gt; this.getTooltipData(),
            (tooltipEvent: tooltip.TooltipEventArgs&amp;lt;number&amp;gt;) =&amp;gt; null); /** &amp;lt;--- right here */
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify this to an empty array, e.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;    private renderTooltip() {
        this.tooltipServiceWrapper.addTooltip(
            d3.select(this.target),
            (tooltipEvent: tooltip.TooltipEventArgs&amp;lt;number&amp;gt;) =&amp;gt; this.getTooltipData(),
            (tooltipEvent: tooltip.TooltipEventArgs&amp;lt;number&amp;gt;) =&amp;gt; []); /** &amp;lt;--- right here */
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will now work as expected, e.g.:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Based on the typings, I think your approach is correct and there is an issue in the utilities somewhere (based on what looks like &lt;A href="https://github.com/microsoft/powerbi-visuals-utils-tooltiputils/pull/45/files" target="_self"&gt;changes made to explicitly remove this restriction in the repo a while back&lt;/A&gt;.) This should apparently not need to be an array - report page tooltips only support a single selector.&lt;/P&gt;
&lt;P&gt;I don't personally use this package in my projects (I usually use the visual host directly) so haven't come across this issue - you might want to raise this as an issue in the repo for the team to look at or provide an official response (giving them a link to your repo as a means of reproducing; it's quite clear in helping to illustrate what I think is incorrect here).&lt;/P&gt;
&lt;P&gt;Either way, the above resolution should get you moving. If you do get to the point of passing in a selection ID for a report page tooltip here, I assume this would also need to be a single element array, so bear this in mind if/when you get there.&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 22:11:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-tooltip-Uncaught-TypeError-Cannot-read-properties-of-null/m-p/2239038#M33447</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2021-12-14T22:11:53Z</dc:date>
    </item>
  </channel>
</rss>

