overlayLogo function will calculate the new height and position for our logo. Then, we will use the
drawImage method to convert the image and make it part of the main canvas. We wrap all of this in a
setInterval function because we have to wait for jqPlot to render all the canvas elements before we can add our image. Perform the following steps to add extra canvas elements:
bottomif nothing is passed in for this parameter. When calculating coordinates for a
canvaselement, we begin at the upper-left corner. So, we declare variables for our height and the x and y coordinates. Next, we create a variable to hold our
setIntervalfunction as follows:
function overlayLogo(id, scaledWidth, yPos) ...