Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

BUG-Blank chart after too much changes #864

Closed
FlorianJacta opened this issue Jul 21, 2023 · 5 comments
Closed

BUG-Blank chart after too much changes #864

FlorianJacta opened this issue Jul 21, 2023 · 5 comments
Assignees
Labels
Gui: Back-End Related to the back-end side of Taipy GUI. 💥Malfunction Addresses an identified problem. 🟧 Priority: High Stalls work on the project or its dependents

Comments

@FlorianJacta
Copy link
Member

Description
If a chart's data changes a lot, the corresponding chart will go blank and will not return to its normal behavior without refreshing the page.

How to reproduce

from taipy.gui import Gui
from math import cos, exp

value = 10

page = """
Markdown
# Taipy *Demo*

Value: <|{value}|>

<|{value}|slider|>

<|{compute_data(value)}|chart|>
"""


def compute_data(decay:int)->list:
    return [cos(i/6) * exp(-i*decay/600) for i in range(10_000)]


Gui(page).run()

Change the slider a lot of times, play with it. The chart should at one point be blank and it is not possible to see the data even by changing the slider again. The user has to refresh the page.

Expected behavior
When the chart goes blank, Taipy should try to make it work

Screenshots

sinus

Runtime environment
Taipy GUI: 2.3.1

@FlorianJacta FlorianJacta added the 💥Malfunction Addresses an identified problem. label Jul 21, 2023
@FabienLelaquais FabienLelaquais added 🟧 Priority: High Stalls work on the project or its dependents Gui: Back-End Related to the back-end side of Taipy GUI. labels Sep 11, 2023
@FabienLelaquais FabienLelaquais self-assigned this Sep 15, 2023
@FabienLelaquais
Copy link
Member

I've been trying to reproduce this problem with Taipy GUI 3.0, watching closely the interaction between the client, that triggers the action of recomputing the data sent to the Chart control, and the server that does the update request.
No errors were detected, and after a while (the time it takes to process all the consecutive change requests from the slider), the chart updates properly. This can, however, take time: there are lots of computations done on the server to deliver the new data.

This delay is obviously caused by the fact that the callback takes a while, preventing immediate feedback on the page. And this is exactly why Taipy recommends that you don't spend too much time on the server responding to front-end events.

There's nothing Taipy GUI can do on its own to fix that delay.
A real problem would occur should the page never update, which I cannot reproduce.

I'm willing to close this issue at this point, after your acknowledgment.

@FlorianJacta
Copy link
Member Author

After too many change requests, my chart will stay like this forever. I need to refresh the page to see it the correct chart appears.

image

@FabienLelaquais
Copy link
Member

I understand.
But I cannot reproduce that behavior.
Are you using Taipy 3.0.0.dev*, and would you consider a screen share of that sometime?

@FlorianJacta
Copy link
Member Author

I am using today version of Taipy:
taipy-gui 3.0.0.dev3

@FlorianJacta
Copy link
Member Author

The example works best with less points:

from taipy.gui import Gui
from math import cos, exp

value = 10

page = """
Markdown
# Taipy *Demo*

Value: <|{value}|>

<|{value}|slider|>

<|{compute_data(value)}|chart|>
"""


def compute_data(decay:int)->list:
    return [cos(i/6) * exp(-i*decay/600) for i in range(100)]


Gui(page).run()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Gui: Back-End Related to the back-end side of Taipy GUI. 💥Malfunction Addresses an identified problem. 🟧 Priority: High Stalls work on the project or its dependents
Projects
None yet
Development

No branches or pull requests

2 participants