Skip to content

Commit 4824ada

Browse files
committed
fix(line): fix animation is not stopped when direct update points.
1 parent 26e9a95 commit 4824ada

File tree

6 files changed

+112
-9
lines changed

6 files changed

+112
-9
lines changed

src/chart/line/LineView.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,17 +1290,18 @@ class LineView extends ChartView {
12901290
next = turnPointsIntoStep(diff.next, coordSys, step);
12911291
stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);
12921292
}
1293-
12941293
// Don't apply animation if diff is large.
12951294
// For better result and avoid memory explosion problems like
12961295
// https://github.com/apache/incubator-echarts/issues/12229
12971296
if (getBoundingDiff(current, next) > 3000
12981297
|| (polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000)
12991298
) {
1299+
polyline.stopAnimation();
13001300
polyline.setShape({
13011301
points: next
13021302
});
13031303
if (polygon) {
1304+
polygon.stopAnimation();
13041305
polygon.setShape({
13051306
points: next,
13061307
stackedOnPoints: stackedOnNext
@@ -1345,7 +1346,6 @@ class LineView extends ChartView {
13451346
}
13461347
}
13471348

1348-
13491349
const updatedDataInfo: {
13501350
el: SymbolExtended,
13511351
ptIdx: number
@@ -1364,7 +1364,6 @@ class LineView extends ChartView {
13641364
}
13651365
}
13661366
}
1367-
13681367
if (polyline.animators && polyline.animators.length) {
13691368
polyline.animators[0].during(function () {
13701369
polygon && polygon.dirtyShape();

src/i18n/langPT-br.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
export default {
2525
time: {
2626
month: [
27-
'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'
27+
'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho',
28+
'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'
2829
],
2930
monthAbbr: [
3031
'Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun',

test/line-extraneous.html renamed to test/line-animation-update.html

Lines changed: 106 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/line-case.html

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/runTest/actions/__meta__.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/runTest/actions/line-extraneous.json renamed to test/runTest/actions/line-animation-update.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy