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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
giorgikok
Frequent Visitor

Delete/cleanup custom visual whenever the necessary data is not longer bound

Hello, 

I am trying to figure out why my column chart visual is not properly deleting after adding the data and then removing it. For instance, removing categories should void the visual since it can't display it anymore but the columns stay on with the last data they've received also without properly scaling to the visual window. 

I am wondering what the problem might be, the destroy() method only does sets the this.svg to null which should be enough to delete the visual from the display window. 

1 ACCEPTED SOLUTION
giorgikok
Frequent Visitor

I figured it out: just had to do this.barContainer.selectAll("*").remove(); whenever the necessary conditions for deletion were met. 

View solution in original post

1 REPLY 1
giorgikok
Frequent Visitor

I figured it out: just had to do this.barContainer.selectAll("*").remove(); whenever the necessary conditions for deletion were met. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.