Graph directive working with data