Commit 5d8e7cd
committed
When dataZoom uses the default filterMode 'filter', AxisProxy calls
selectRange() on the series store, which physically drops every row
whose value falls outside the window. For line / area series this
corrupts the rendering in two ways:
- A line segment that crosses the window boundary loses one of its
endpoints, so the visible portion of the segment vanishes
entirely (#21564).
- A null data point that interrupts the line gets dropped if its
own value sits outside the window, so the line view no longer
sees the gap and connects across it as a ghost line (#21565).
This is most visible when data is non-monotonic in the filter
dimension and the null is the only signal that two adjacent rows
belong to different segments.
Replace selectRange with a boundary-aware filter for line subType
only: keep row i when row i, row i-1 or row i+1 is in the window.
A single Uint8Array pre-scan computes inWindow status; filterSelf
then applies the keep predicate. Other series types and other filter
modes are untouched.
Adds unit coverage for the partial-segment case, the null-gap case,
the bar-series no-op, the filterMode: 'none' no-op, and the
all-in-window short-circuit. Adds a visual reproducer at
test/line-dataZoom-boundary.html.
1 parent dc60bdd commit 5d8e7cd
3 files changed
Lines changed: 362 additions & 0 deletions
File tree
- src/component/dataZoom
- test
- ut/spec/component/dataZoom
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
453 | 460 | | |
454 | 461 | | |
455 | 462 | | |
| |||
499 | 506 | | |
500 | 507 | | |
501 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
502 | 550 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments