Changing Plotly's Default Separator from ', ' to '<br>'

Hi everyone,

I’m enhancing my Dash application to allow users to change the name, color, and markers of any plot series by modifying fig.data. These changes are then saved in dcc.Store, using the trace number and its original name for indexing. Generally, this approach works well.

The issue arises when the trace parameter isdynamically incorporated into px.line() via dropdown selection. Dash seems to automatically insert trace value into the series name, separated by ', '.

As a result, my renaming feature becomes ineffective because the series name is altered. Ideally, I’d like to preserve the renamed portion even when color/trace values are appended to the name.

I considered a workaround: storing the rename information up to the first ‘br’ (cannot work with ', ’ since some my series names already contain commas and spaces. Still, this would require changing Dash plotly’s default behavior from separating with ', ’ to using ‘br’. Is there a way to adjust this behavior? Or maybe a better way to approach my problem?