Clientside callback to add trace in figure

Would you be able to post an MRE to aid with helping you out?