I'd rate Hagler as a top 4 middleweight, all time. Chavez is possibly the #1 at 'super feather'/'junior light' but that division doesn't quite carry the same prestige.
I'm not sure I can split them. Hagler went into retirement more gracefully than Chavez - that might be his biggest advantage.