Forum Discussion
BUG Clone visual API does not create independent visual
Hi Anonymous ,
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.
It is very limiting that cou can't edit your visual once cloned, it is one of the purpose of cloning actually.
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).
Thanks,
Rgds.
Marc.
Hi Marco57,
>>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).
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.
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.
report.on('loaded', function(event)
{
reportPages = await report.getPages();
});
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)
For this scenario, maybe you need to check the visual class and manually to processing with its contents.
Regards,
Xiaoxin Sheng
- Marco575 years agoHelper III
Anonymous
Thanks for the follow up.
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.
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.
Thanks.
Rgds,
Marc.
- Anonymous5 years agoNot applicable
Hi Marco57,
Yes, current APIs not released some interfaces so they may limit the advanced operations and usages.
Maybe you can submit the idea to add more features that allow advanced operations with API and power bi contents.
Regards,Xiaoxin Sheng