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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.