add graph directive