Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Marco57
Helper III
Helper III

clone visual API not working

Hello,

 

I am trying to create a clone of a visual and I do not even have the clone created at all. I am using V3 api of the power bi client:

 let cloneLayout = {
      layout: <pbi.models.IVisualLayout> {
        x: slicerVisual.layout.x + slicerVisual.layout.width + 1,
        y: slicerVisual.layout.y + slicerVisual.layout.height * .5 - this.deleteFilterButtonVisual.layout.height * .5,
        width: 60,
        height: 60,
        displayState: {
          mode: pbi.models.VisualContainerDisplayMode.Visible
        }
      },
      autoFocus: false,
    };

let deleteVisual = await this.deleteFilterButtonVisual.clone(cloneLayout);

 

in the console I can see properly that I get my new visual created:

 

Marco57_1-1612284156962.png

 

Still I can't see anything about my visual on the report. I also tried cloning other visuals and still same issue.

 

Is there any other required step to see the new visual cloned after generating it?

 

Thanks in advance.

Marc.

3 REPLIES 3
v-lionel-msft
Community Support
Community Support

Hi @Marco57 ,

 

Do you have the "Edit" permission of the report?

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-lionel-msft ,

 

I am embedding the report with "view" access level and not edit.

 

Thanks and regards.

Marco57
Helper III
Helper III

I give a bit more detail here:

I am copying a hidden visual and even if specifying in the layout as you can see above that I want it to be "Visible", it is still letting it hidden, this is why I could not see it. I do not know if this is a bug, I would say yes.

 

Second thing, on a clone visual, changing properties of the newly created visual is also changing properties from the original visual fromw which it was clone. There are no details on the API if this is the normal expected behaviour but I can imagine how limiting this could be.

 

Is there any other way to duplicate a visual without having to use clone? In my case the visual is an image on which I want to associate an action as a button.

 

Thanks again.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.