I have the following graph which can dynamically add subplots and to distinguish between each subplot I add borders using the ‘mirror’ property of ‘xaxis’ setting it to ‘allticks’, and it works well for the subplots as seen in the image
The problem starts when I add the volume subplot since it goes on top of the candlesticks subplot but due to the mirror the line appears on the upper edge of the volume subplot which I don’t want to be visible
So the solution that I came up with was to remove the mirror by setting it to false and manually add the border to the rect elements of each subplot except the volume one using the following lines
document.getElementsByClassName('bglayer').lastElementChild.style['stroke-width'] = 1 document.getElementsByClassName('bglayer').lastElementChild.style['stroke'] = 'dimgrey'
It works but apparently there is a background routine that constantly rewrites the styles of the rec elements changing the stroke-width to 0 which I don’t understand in order to constantly refresh the recs so my next option was to add a class to the recs that I modify the boder with the following line
But again it didn’t work, it doesn’t recognize the styles.
Could someone help me with this problem? any solution to add borders independently to subplots?