We are modernizing our Excel VBA add-in to Office.js. One of the functions of our add-in is to format charts into company branding. Since we cannot manipulate default Microsoft chart elements, we use...
AdrianWu
Microsoft
Jun 03, 2025Hi, thank you very much for the feature suggestion!
The grouping capability should be already doable today.
Please check shapecollection.addGroup()
For exact implementation sample, please see below:
const chartShape = sheet.shapes.getItem(chart.id);
const group = sheet.shapes.addGroup([textbox, chartShape]);
However, if you expect to insert shapes and text boxes directly into the chart rather than keeping them outside of it, this capability is not feasible today. This issue has been tracked in this feature request -
Add Support for Shapes in Charts to Excel Online
Please help vote in that thread if it aligns with what you're looking for. Higher engagement here will help us better prioritize this request among the current asks. Thank you so much!