Candlestick and trendline relative positions change under zooming or panning

I use Plotly 5.1.0 and Dash 2.0.0 to draw a stock candlestick chart. Then I use the mouse and the Plotly graph’s ModeBar drawline button to draw two parallel support and resistance trendlines on the candlestick charts. The two parallel trendlines have a certain angle with X axis (i.e. they are not horizontal). So far all candlesticks are under the resistance trendline and above the support trendlines. However when I zoom-in or pan the graph so that part of trendlines extend beyond graph boundary, the relative positions of candlesticks and the two parallel trendlines change. Some candlesticks drop either below or above the parallel trendlines. I would expect the candlesticks should stay within the two parallel trendlines, regardless how the graph is zoomed-in and/or panned. Could you please advise how I could resolve this issue? Thanks very much in advance.