Sunburst: open/close branches not by click but via API or ID

Does anyone know, if it’s possible to open/close the branches of a sunburst chart not by click, but by an API from a function?

Thanks for your help.

Hans