Generating graphics under the selected link.

The page is getting so much slow.
pending: use ajax to get the history metric values and include it in the function that generate the graphics.