Ability to plot status change (enums) timeseries

I’m trying to visualize transitions between different states over the course of time. To help understand the issue, pretend I have time series data about a car as someone is driving it. The states might be

  1. Engine Off
  2. Idle
  3. Accelerate
  4. Cruise
  5. Brake

Over the course of a drive, the car will transition between these various states. I want a time series chart that will allow me to visualize how long a user is in each one of these states and the transitions between them.

So far, I’ve tried converting each of these state values into a number representing that state and then plotting it over time. Technically that works, but as a viewer of the graph, I don’t know what “4” might actually mean. So one way of improving this would be to allow me to map/format the numbers as the text descriptions, or at least have a tooltip that could show the label.