Add callback and generate graph dialog