fix code style in graph