Fix build_graph so that it returns None if there are no transactions.
Make dashboard view display the graph constructed using the services.

This also involved making some changes to the way build_graph works,
some bugfixes and new tests, etc.