Topic: Recovery of output agents after loading SVG of an element from a DB

There is a page on it div an element, in which svg an element. In svg the graph, peaks of the graph  is drawn. The data svg is saved in a DB. All graph (all svg an element) is saved at once. After recovery from a peak DB cease to be .
I recover here so:

document.getElementById (' svgBox ').innerHTML=encodedString;

Recovery goes at page loading. How to hang handlers on peaks of the graph, after recovery from a DB?