State timeline legend on bars instead of value

I have a state timeline with a single binary value. It looks like this:

But the labels are really long and clog up my dashboard. Instead I’d like the labels to be displayed on the yellow bars, instead of the (now hidden values). Is there a hack to do that?

Ideally I’d like to be able to make a Value mapping from 1 → {{legend}}.

I have not experimented around enough with the value mapping to try to clean up the long labels. However, since you just are plotting a single binary value, you could create several “stacked” panels like that shown below.