I have a chart displaying images, which are showing up correctly. However, I am facing an issue when I try to add some spacing to the chart by using margin-left
and margin-right
.
Here is the CSS code I included:
#chart1 {
margin: 0 auto;
overflow : hidden;
margin-left: 60px;
margin-right: 60px;
}
Regarding the JavaScript code: The following code is used to position the images on the chart at specific locations. It works fine when the chart occupies 100% of the space, but when I apply the above CSS code, the image positions do not align as intended.
overlay.style.left = (overlayBounds.x / (timelineWidth / 100) ) + '%';