<?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: BUG Clone visual API does not create independent visual in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1659829#M27787</link>
    <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/278723"&gt;@Marco57&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" color="#808080"&gt;&lt;EM&gt;&amp;gt;&amp;gt;From your last part, should I get that there are actually no means at all to clone a visual and customize it expcet regarding it filters and layout? ( which is very poor to be honest from an API point of view).&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;It sounds like my description makes you confused with use these functions. They mean the 'render'/'onload' functions not include parameters, so you can't directly send parameters to them.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;It does not mean you can't interact with them, you can refer to the following link to add some processing to do custom after the function finished.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/handle-events" target="_self"&gt;How to handle events&lt;/A&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;report.on('loaded', function(event)
{
    reportPages = await report.getPages();
});&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;The clone visual contents are processed by clone function internal, I haven't found they share any official interface or parameters of 'visual object' that allow you to customize. (so if these visual objects are designed with singleton mode, it may cause the issue that you mention)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;For this scenario, maybe you need to check the visual class and manually to processing with its contents.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://docs.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/visual.visual" target="_blank"&gt;Visual class | Microsoft Docs&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2021 08:19:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-02-11T08:19:40Z</dc:date>
    <item>
      <title>BUG Clone visual API does not create independent visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1650312#M27712</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to clone an existing empty visual instead of creating a new one as we are limited on what we can customize as visual properties from the API side (can't change data color for instance).&lt;/P&gt;&lt;P&gt;I need to clone multiple versions of this visual with different filters/properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My issue is that each time I clone the visual and modify its dataFields, previously cloned visuals are also having those dataFields added. Actually this means clone method is not making a deep copy but only a shallow copy which is not the behaviour desscribed in the documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Clone-Visual" target="_blank"&gt;https://github.com/Microsoft/PowerBI-JavaScript/wiki/Clone-Visual&lt;/A&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;Use clone visual API to clone a specific visual into active page. It's helpful when you want to create copies of one visual with different filters or different layout."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is very limiting as this is the only way for me to create visuals that would be customized upfront to compensate for lack of properties available from the API side.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Am I missing something? Is there any workaround?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Rgds,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Marc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2021 21:43:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1650312#M27712</guid>
      <dc:creator>Marco57</dc:creator>
      <dc:date>2021-02-07T21:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: BUG Clone visual API does not create independent visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1656282#M27763</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/278723"&gt;@Marco57&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;As the document mentioned, this clone function will receive the filter effects and visual layout(size, locations). It did not directly get the corresponding data fields that use in target visual designs.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;According to your descriptions, it seems like you want to get different filter effects to dynamically change the visual designs. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;For this requirement, I think you need to do some customization with its render to initiation function to force refresh the current layout and render new styles if possible. (BTW, I check the document but found they are packaged functions and not support any parameters so you can't custom their processing)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 02:04:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1656282#M27763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-10T02:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: BUG Clone visual API does not create independent visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1657448#M27768</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your answer. The clone function is indeed not expecting dataFields input but its aim is to be able to clone separate visuals so you could modify them independently. It is not explained by the documentation that all the cloned visuals would effectively be sharing all same dataFields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is very limiting that cou can't edit your visual once cloned, it is one of the purpose of cloning actually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From your last part, should I get that there are actually no means at all to clone a visual and customize it expcet regarding it filters and layout? ( which is very poor to be honest from an API point of view).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rgds.&lt;/P&gt;&lt;P&gt;Marc.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 11:16:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1657448#M27768</guid>
      <dc:creator>Marco57</dc:creator>
      <dc:date>2021-02-10T11:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: BUG Clone visual API does not create independent visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1659829#M27787</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/278723"&gt;@Marco57&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" color="#808080"&gt;&lt;EM&gt;&amp;gt;&amp;gt;From your last part, should I get that there are actually no means at all to clone a visual and customize it expcet regarding it filters and layout? ( which is very poor to be honest from an API point of view).&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;It sounds like my description makes you confused with use these functions. They mean the 'render'/'onload' functions not include parameters, so you can't directly send parameters to them.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;It does not mean you can't interact with them, you can refer to the following link to add some processing to do custom after the function finished.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/handle-events" target="_self"&gt;How to handle events&lt;/A&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;report.on('loaded', function(event)
{
    reportPages = await report.getPages();
});&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;The clone visual contents are processed by clone function internal, I haven't found they share any official interface or parameters of 'visual object' that allow you to customize. (so if these visual objects are designed with singleton mode, it may cause the issue that you mention)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;For this scenario, maybe you need to check the visual class and manually to processing with its contents.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://docs.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/visual.visual" target="_blank"&gt;Visual class | Microsoft Docs&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 08:19:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1659829#M27787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-11T08:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: BUG Clone visual API does not create independent visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1672892#M27914</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the follow up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand there are no means/workaround to duplicate a visual and edit it by our means except when this editing concerns filtered content/layout.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well this is awfully limiting its usage, on the desktop you can simply do ctrl+c, ctrl+v and with the full API this is even not possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Marc.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 22:12:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1672892#M27914</guid>
      <dc:creator>Marco57</dc:creator>
      <dc:date>2021-02-17T22:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: BUG Clone visual API does not create independent visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1682792#M28033</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/278723"&gt;@Marco57&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Yes, current APIs not released some interfaces so they may limit the advanced operations and usages. &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Maybe you can submit the idea to add more features that allow advanced operations with API and power bi contents.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 07:47:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/BUG-Clone-visual-API-does-not-create-independent-visual/m-p/1682792#M28033</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-23T07:47:28Z</dc:date>
    </item>
  </channel>
</rss>

