[bug] yoyo has wrong value
Open
Nobody has claimed this yet.
Bug
- Dominant language
- TypeScript
- Stars
- 10.1k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
demo
const rootEl = document.getElementById("root");
Object.assign(rootEl.style, {
width: "800px",
height: "600px",
});
rootEl.innerHTML = "loading";
const dataX = [];
const dataY = [];
let i = 0;
createAnimationQueue({
from: { value: 1 },
to: { value: 1.5 },
yoyo: true,
repeat: 3,
onUpdate: (o) => {
dataX.push(i++);
dataY.push(o.value);
},
onComplete: () => {
const chart = ec.init(rootEl);
chart.setOption({
xAxis: {
type: "category",
data: dataX,
},
yAxis: {
type: "value",
},
series: [
{
data: dataY,
type: "line",
},
],
});
},
});
result
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the createAnimationQueue call shown in the issue and reproduce the demo using yoyo: true and repeat: 3. Trace the values received by onUpdate and compare them with the resulting chart data. Done means the yoyo sequence reports the expected values throughout the animation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100