Before finding minimal spanning tree, pass graph reference to the canvas.