Hi @Emil. Thanks for the feedback. Iâll try to ellaborate a bit more my scenario and then ask about what I am not getting.
I have an endpoint where on first load, the same graph is always loaded. This graph is a genome with the corresponding 24 chromosomes. On the first load, it is always loaded with a highlight on the first chrosome, as follows:
fig.add_vrect(x0=x_min, x1=x_max, fillcolor="green",
opacity=0.25, line_width=0)
This is a highlighted area of a scatterplot, which has some update_layout
options, which is as follows:
fig = px.scatter(df_in, x="x_col", y="y_col",
title=title,
labels={
"x_col": "x"
},
color="color_col",
hover_data = {
"y_col": True,
"x_col": ":,",
"color_col": False
})
This graph just updates dynamically changing the highlighted green area to the given section of the scatterplot. Currently the update operations of the plot are quite fluid, but the first load takes around 15-25 seconds.
The plots are already preprocessed and stored on a csv, which is embedded with the corresponding pandas dataframe. If I understood you correctly, what you mean is to, instead of inserting to the scatterplot a pandas dataframe, transform the input csv to json with the given x and y points and pass this as the input data? Is it therefore something similar to this? I mean, is the issue regarding slow plotting related to transforming the pandas dataframe to json?
Thanks a lot.