I have created a graph in react-plotly.js.
I am looking to create the equivalent of spike lines but where the coordinate of any location is shown regardless of if there is a data point there. Does anyone know if this is possible? So far I’ve only been able to get it if there is a point in the location.
Thanks for the help!
Hi @bpolasek, not sure how to do this.
The only idea I have is adding a imshow trace with the same dimensions as your range. I’m aware that I’m posting a python example, JS should be similar tough.
import plotly.express as px
import numpy as np
# create image and plotly express object
fig = px.imshow(
np.zeros(shape=(90, 160, 4))
x=[5, 20, 50],
y=[5, 20, 50],
# update layout
# hide color bar
# enable spike lines