GK: writing linegraph directive