configure graph function