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

Handle Plotly animation #1773

Open
1 of 6 tasks
FlorianJacta opened this issue Sep 10, 2024 · 21 comments · May be fixed by #2443
Open
1 of 6 tasks

Handle Plotly animation #1773

FlorianJacta opened this issue Sep 10, 2024 · 21 comments · May be fixed by #2443
Assignees
Labels
🖰 GUI Related to GUI 🆘 Help wanted Open to participation from the community ✨New feature 🟩 Priority: Low Low priority and doesn't need to be rushed

Comments

@FlorianJacta
Copy link
Member

FlorianJacta commented Sep 10, 2024

Description

The goal would be to handle Plotly animation inside Taipy or find a workaround for it.

This was asked by a user.

Technical proposal 1 [DOES NOT WORK]

We seem to cover basic use cases with the addition of an animation property that would describe if and how animation would take place.
This property must indicate which dataset columns are animated, and animation properties such as the transition easing and speed.

Use case: I want to change which of the dataset column is represented, animating from the initial one to the next.
Data definition is:

     x = [0, 1, 2, 3]
     y1 = [0, 1, 4, 9]
     y2 = [0, 1, 8, 27]

Animated column value: y_values="y1"

Chart definition is:

      x=x 
      y={y_values}  (so it can be dynamically updated)
      animation={ on="y", duration=1000, easing="linear" }

Meaning:
We are initially showing 'y1' on the 'y' axis.
If 'y' changes to a new column, animate the chart with the indicated parameters.
Now I set 'y_values' to "y2", the chart can animate from the values in 'y1' to the values in 'y2'.

Why it does not work

The problem is y={y_values} that presumes that y is dynamic, which it is not.
Although this would be the panacea, it is not how Taipy GUI charts work, and it would be a mess to change that.

Technical proposal 2

Data definition is:

data = {
     "x": [0, 1, 2, 3],
     "y": [0, 1, 4, 9]
}

We will add an animation_data dynamic property that must be a dataset with only the columns that are animated:

data = {
     "y": [0, 1, 8, 27]
}

When the chart component has this property set, it loads it all, and receives all the columns that are impacted.
Because the "y" columns appears in both datasets, the 'from' and 'to' frames can be built from the two column values.
And animation is performed.

When a new animation_data is sent (with new data, in the same column(s)), we move the 'to' frame to the 'from' frame and recompute the new 'to' frame from the values in the animation_data column(s).

From the user stand point, all that needs to be done is update the animation_data content. The animation is carried immediately.
There should also be a animation_config (or animation for short) dictionary (static) property that can tune the animation parameters such as speed or type.

Acceptance Criteria

  • Ensure new code is unit tested, and check code coverage is at least 90%.
  • Create related issue in taipy-doc for documentation and Release Notes.
  • Check if a new demo could be provided based on this, or if legacy demos could be benefit from it.
  • Ensure any change is well documented.

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)
@FlorianJacta FlorianJacta added 🖰 GUI Related to GUI 🟩 Priority: Low Low priority and doesn't need to be rushed ✨New feature labels Sep 10, 2024
@jrobinAV jrobinAV added 🆘 Help wanted Open to participation from the community hacktoberfest labels Sep 27, 2024
@ScalarJerk
Copy link

@FlorianJacta to clarify, we're adding a gui element that allows users to integrate plotly animations, right?

@FlorianJacta
Copy link
Member Author

@ScalarJerk I think it could be taken in charge by the chart visual element. What do you think? @FabienLelaquais @FredLL-Avaiga

@rakshitmalik136
Copy link

rakshitmalik136 commented Oct 1, 2024

Hey! @ScalarJerk and @FlorianJacta
I want to work on this issue under hacktoberfest. Please assign me this..

@FlorianJacta
Copy link
Member Author

@ScalarJerk Was your plan to work on this issue?

@rakshitmalik136
Copy link

rakshitmalik136 commented Oct 3, 2024

Hey! @ScalarJerk and @FlorianJacta I want to work on this issue under hacktoberfest. Please assign me this..

@ScalarJerk @FlorianJacta any updates??
shall i start working on it?

@FlorianJacta
Copy link
Member Author

Yes, I think you can start working on it. I am assigning you this issue @rakshitmalik136 ! Thank you

@rakshitmalik136
Copy link

rakshitmalik136 commented Oct 5, 2024

Just to Clarify, the code that i need to work on, should reside in taipy\frontend\taipy-gui\public\stylekit\elements folder or somewhere else?
@FlorianJacta

taipy\frontend\taipy-gui.../chart.tsx more

@THEBOSS0369
Copy link
Contributor

THEBOSS0369 commented Oct 6, 2024

Hey @rakshitmalik136 ! Are you able to start the server i.e, the gui server for the front-end, if yes can you help me i am unable to start the server. I have been stuck in this problem for 4 days . Please contact me on the discord
This issue on discord

@FredLL-Avaiga
Copy link
Member

FredLL-Avaiga commented Oct 6, 2024

Hey @rakshitmalik136 ! Are you able to start the server i.e, the gui server for the front-end, if yes can you help me i am unable to start the server. I have been stuck in this problem for 4 days . Please contact me on the discord
This issue on discord

You can look at simple example in doc/gui/examples

@FredLL-Avaiga
Copy link
Member

@FlorianJacta to clarify, we're adding a gui element that allows users to integrate plotly animations, right?

The chart component is located at taipy/frontend/taipy-gui/.../chart.tsx

Copy link

quest-bot bot commented Oct 7, 2024

New Quest! image New Quest!

A new Quest has been launched in @Avaiga’s repo.
Merge a PR that solves this issue to loot the Quest and earn your reward.


Some loot has been stashed in this issue to reward the solver!

🗡 Comment @quest-bot embark to check-in for this Quest and start solving the issue. Other solvers will be notified!

⚔️ When you submit a PR, comment @quest-bot loot #1773 to link your PR to this Quest.

Questions? Check out the docs.

rakshitmalik136 added a commit to rakshitmalik136/taipy that referenced this issue Oct 11, 2024
Handle Plotly animation Avaiga#1773
@quest-bot loot Avaiga#1773
@rakshitmalik136
Copy link

@quest-bot loot #1773

Copy link

quest-bot bot commented Oct 11, 2024

⚠️ Oops... You can only loot in a Pull Request!

Check the docs for more info.

Copy link

quest-bot bot commented Oct 11, 2024

🧚 @rakshitmalik136 has submitted PR #2019 and is claiming the loot.

Keep up the pace, or you'll be left in the shadows.

Questions? Check out the docs.

@mzf11125
Copy link

Hey, I'm interested in helping with this issue. Is it possible? Thanks

@mzf11125
Copy link

@quest-bot embark

Copy link

quest-bot bot commented Oct 17, 2024

@mzf11125 has embarked on their Quest. 🗡

  • @mzf11125 has been on GitHub since 2021.
  • They have merged 4 public PRs in that time.
  • Their swords are blessed with JavaScript and CSS magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

Copy link
Contributor

github-actions bot commented Nov 4, 2024

This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.

@github-actions github-actions bot added the 🥶Waiting for contributor Issues or PRs waiting for a long time label Nov 4, 2024
@github-actions github-actions bot removed the 🥶Waiting for contributor Issues or PRs waiting for a long time label Nov 18, 2024
Copy link
Contributor

This issue has been unassigned automatically because it has been marked as "🥶Waiting for contributor" for more than 14 days with no activity.

Copy link
Contributor

This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.

@github-actions github-actions bot added the 🥶Waiting for contributor Issues or PRs waiting for a long time label Jan 30, 2025
@namnguyen20999 namnguyen20999 linked a pull request Feb 11, 2025 that will close this issue
11 tasks
@github-actions github-actions bot removed the 🥶Waiting for contributor Issues or PRs waiting for a long time label Feb 13, 2025
Copy link
Contributor

This issue has been unassigned automatically because it has been marked as "🥶Waiting for contributor" for more than 14 days with no activity.

@FabienLelaquais FabienLelaquais linked a pull request Feb 20, 2025 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖰 GUI Related to GUI 🆘 Help wanted Open to participation from the community ✨New feature 🟩 Priority: Low Low priority and doesn't need to be rushed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants