<?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 Visual gets 5 updates on startup in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3835811#M9457</link>
    <description>&lt;P&gt;did you set it as responsive?&lt;/P&gt;</description>
    <pubDate>Sat, 13 Apr 2024 20:35:56 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-04-13T20:35:56Z</dc:date>
    <item>
      <title>Custom Visual gets 5 updates on startup</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3834187#M9450</link>
      <description>&lt;P&gt;My custom visual gets 5 updates on startup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options.type for these updates is:&lt;BR /&gt;1. 64 //VisualUpdateType.FormattingSubSelectionChange&lt;BR /&gt;2. 128 //VisualUpdateType.FormatModeChange&lt;BR /&gt;3. 36 //VisualUpdateType.Resize + VisualUpdateType.ResizeEnd&lt;BR /&gt;4. 2 //VisualUpdateType.Data&lt;BR /&gt;5. 36 //VisualUpdateType.Resize + VisualUpdateType.ResizeEnd&lt;BR /&gt;6. 2 //VisualUpdateType.Data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it normal? If so how to avoid rerendering my visual.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 13:29:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3834187#M9450</guid>
      <dc:creator>emiljas</dc:creator>
      <dc:date>2024-04-12T13:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual gets 5 updates on startup</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3835811#M9457</link>
      <description>&lt;P&gt;did you set it as responsive?&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2024 20:35:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3835811#M9457</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-13T20:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual gets 5 updates on startup</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3836230#M9458</link>
      <description>&lt;P&gt;No, "General -&amp;gt; Properties -&amp;gt; Advanced options -&amp;gt; Responsive" toggle is off and disabled&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2024 13:14:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3836230#M9458</guid>
      <dc:creator>emiljas</dc:creator>
      <dc:date>2024-04-14T13:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual gets 5 updates on startup</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3836846#M9459</link>
      <description>&lt;P&gt;It seems odd—you typically get the updates needed from the visual host and for startup, this is usually one if you have data present (or if you're using the landing page API). I've tried a few of my projects (just in case there has been a recent change to the developer visual that I haven't noticed), and this is still the case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this happen if you create a new visual project, or is it with your implemented logic? If the latter, are you doing anything as part of your visual update process, such as handling property migration or additional data fetching? These operations will trigger additional updates from the visual host. If you haven't confirmed, it could be good to check the &lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/power-bi-visuals-concept" target="_self"&gt;interaction diagram&lt;/A&gt;, to check what operations trigger what, and to eliminate anything from your logic that might be superfluous for this process. Note that you may need to consider filtering these by checking the update type and routing accordingly (if they exist) so that you don't unnecessarily cause these updates when they're not needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Beyond that, you may need to share your update method so we can see if anything obvious sticks out. It would also be good to know which version of the API and visuals tools you're using (just in case mine are different to yours).&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 04:34:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3836846#M9459</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2024-04-15T04:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual gets 5 updates on startup</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3838803#M9464</link>
      <description>&lt;P&gt;Besides of my custom visual I also tried on this visual:&lt;BR /&gt;&lt;A href="https://github.com/microsoft/PowerBI-visuals-sampleBarChart" target="_self"&gt;https://github.com/microsoft/PowerBI-visuals-sampleBarChart&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same results...&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 16:24:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3838803#M9464</guid>
      <dc:creator>emiljas</dc:creator>
      <dc:date>2024-04-15T16:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual gets 5 updates on startup</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3841944#M9466</link>
      <description>&lt;P&gt;I wonder if it's related to my PowerBI account.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would anyone be so kind to run this&amp;nbsp;sampleBarChart&amp;nbsp;visual on your machine and tell me what update types you gets?&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/microsoft/PowerBI-visuals-sampleBarChart" target="_self" rel="nofollow noopener noreferrer"&gt;https://github.com/microsoft/PowerBI-visuals-sampleBarChart&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's very easy to set up:&lt;/P&gt;&lt;P&gt;1. Install dependencies&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;npm install&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Serve visual&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;npm run start&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 14:43:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3841944#M9466</guid>
      <dc:creator>emiljas</dc:creator>
      <dc:date>2024-04-16T14:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual gets 5 updates on startup</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3842732#M9468</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/632766"&gt;@emiljas&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using the sample bar chart repo, If I refresh the visual with data in the data view, I get one update with a 510 (&lt;FONT face="courier new,courier"&gt;VisualUpdateType.All&lt;/FONT&gt;) as expected:&lt;/P&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="dmp_0-1713305440724.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1079958i54C2009588732506/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dmp_0-1713305440724.png" alt="dmp_0-1713305440724.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The only time I can get multiple update methods to be called is when I put the visual in and out of focus mode (which is expected due to changes in the viewport between states).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 22:17:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3842732#M9468</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2024-04-16T22:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual gets 5 updates on startup</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3844587#M9470</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;I also gets&amp;nbsp;&lt;SPAN&gt;510 when I hit refesh button but could you check what if you save report and reload page?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 08:17:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3844587#M9470</guid>
      <dc:creator>emiljas</dc:creator>
      <dc:date>2024-04-17T08:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual gets 5 updates on startup</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3846755#M9474</link>
      <description>&lt;P&gt;If I save and reload the page, I do get a few more updates. These are not necessarily the same as you, or in the same order, but there are definitely more of them:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmp_0-1713391181308.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1080908i3D3FF694331BAAC4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dmp_0-1713391181308.png" alt="dmp_0-1713391181308.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Interestingly, if I navigate away from the report and re-open it, I just get two &lt;FONT face="courier new,courier"&gt;VisualUpdateType.Resize | VisualUpdateType.ResizeEnd&lt;/FONT&gt; updates when my visual loads:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmp_1-1713391242249.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1080910i5240608E2F4CF177/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dmp_1-1713391242249.png" alt="dmp_1-1713391242249.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I do a 'refresh visuals' operation (top-right corner when viewing the report), I get the following:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmp_2-1713391441511.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1080912i7E78EF5B15E9AC36/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dmp_2-1713391441511.png" alt="dmp_2-1713391441511.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would presume that there are reasons for the quantity of the updates, and I would still recommend my advice of defensively handling update types for your visual so that you only run the logic you need to when you need to. However,&amp;nbsp;if you want to know why these updates occur, it would be best to check with MS directly. They don't monitor the forums, so you can either open an issue in the &lt;A href="https://github.com/microsoft/powerbi-visuals-api/issues" target="_self"&gt;powerbi-visuals-api repo&lt;/A&gt;&amp;nbsp;or email them at &lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com &lt;/A&gt;for specific questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 22:12:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-gets-5-updates-on-startup/m-p/3846755#M9474</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2024-04-17T22:12:53Z</dc:date>
    </item>
  </channel>
</rss>

