Merge graph handling javascript together.
Fix toggling of requirement items in show.