plotly / plotly/react-plotly.js

How to do simple animation on plots in react

Open
#283 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
138
Avg merge
3d 2h
Merged PRs (30d)
4

Description

Hi,

I would like to do a simple animation on a scatterplot. The goal is to have the lines+markers of the plot move horizontally, similarly to the first example of https://plotly.com/javascript/animations/, but I can not find any example of how to achieve this when the Plot is a React component.
In the example I can edit the relevant section of the code in codepen and by changing the original to the following I get the animation I am looking for (works only once, but shows what I would like to do).
Plotly.animate('graph', { data: [{x: [0,1,2]}], ...
My question is how could this be replicated in React (react-plotly.js) with a <Plot .../> component in the return function?

Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by comparing the Plotly JavaScript animation example with the react-plotly.js <Plot .../> usage described in the issue. Determine whether the project should document or demonstrate the equivalent API, and consider the request complete when a React example shows the scatterplot moving horizontally.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
data-visualization, frontend
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.