I have a timeseries plot in plotly and list of timestamps for which I want to create a vertical line on my plotly plot. I understand that vertical line can be drawn using shape as follow:

I believe the shapes approach is currently the only way to get a truly infinite vertical line. So if this is what you need, then I’d recommend opening a issue in the plotly.js repository regarding the performance problems you’re seeing.

The only real alternative is to model a vertical line with one or more scatter or scattergl traces. This would require you to choose explicit min/max y-coordinates for the vertical lines. If you need to draw a whole bunch of these lines, I’d recommend modeling them as a single scatter(gl) trace by interspersing None values to break the line and setting connectgaps to False (see https://plot.ly/python/line-charts/#connect-data-gaps).

If this last paragraph isn’t clear, feel free to share a proof-of-concept example of what you’re trying to do (using the slow method above), and I can show you what it could look like using a scatter trace.

Hi @jmmease ,
I used plotly to plot sensor data and i used the shapes feature to draw a grid like engineering graph paper. and everything working alright when the number of points plotted is less because when the points are less number of grid lines are drawn in other words less , lesser number of shapes are drawn because each gridline is a shape .I have to plot lakhs of data now so tens of thousands of shapes should be drawn to form the grid. the html is generated but it takes forever to load the graph. Is there any way to improve the performance when tens of thousands of shapes(lines) are drawn .so that graph loads . Any help will be appreciated.
Thank you