Slider Plot with legend. Can I hard-code a legend without adding extra traces?

Iโ€™ve made a plot with a slider. For each step in the slider a trace is required. All my traces consist of a bar plot with multiple colors, but this is ONE trace, itโ€™s not what is considered a stacked bar plot, this consists of multiple traces. The problem is that one trace can only create one legend category. I could make a figure with multiple traces for more legend categories BUT if i try to do this, i will get a huge amount of steps since for every trace, there must be created a new step. Is there any way to for example hard-code a legend without having to implement a trace.

1 Like