refactor: put d3 graph renderer into service