Update viewandcompare.php

fix the graph and fix fetching friends name ..