Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad performance when realtime incremental updating charts #4704

Closed
code1704 opened this issue Jul 30, 2024 · 1 comment
Closed

bad performance when realtime incremental updating charts #4704

code1704 opened this issue Jul 30, 2024 · 1 comment

Comments

@code1704
Copy link

I use plotly to draw realtime stock prices in jupyter. The data is updated every second and there are multi plotly charts.

# pseudocode
fig = go.FigureWidget(
    data=[..],
    layout={..},
)

async def update():
        while True:
            data = .. fetch data here
            with fig.batch_update():
                for i in range(len(data_row)):
                    self._chart.data[i].x += (data[i].datetime,)
                    self._chart.data[i].y += (data[i].price,)
            await asyncio.sleep(1.0)

When there are more than 10+ charts, the performance becomes very bad. seems plotly does not do incremental update, instead, it re-render whole chart every second?

Is there any way to improve the performance? How to make it do incremental update?

@gvwilson
Copy link
Contributor

gvwilson commented Aug 7, 2024

Thank you for your interest in plotly - for how-to / support questions like this, you will probably get a response more quickly in our forums (https://community.plotly.com/). Cheers - @gvwilson

@gvwilson gvwilson closed this as completed Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants