Heatmap entries sorted like metric graphs

Heatmap entries are sorted using the same directive (ascending, descending, by name) that is being used to sort metric graphs. Enhancement suggested by Craig West.