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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.