Add legend to state machine editor