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

[Bug] canOmitUnusedDimensions will mess up the dimension indexes #20672

Open
Justin-ZS opened this issue Jan 9, 2025 · 0 comments · May be fixed by #20682
Open

[Bug] canOmitUnusedDimensions will mess up the dimension indexes #20672

Justin-ZS opened this issue Jan 9, 2025 · 0 comments · May be fixed by #20682
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@Justin-ZS
Copy link

Justin-ZS commented Jan 9, 2025

Version

5.6.0

Link to Minimal Reproduction

Demo

Steps to Reproduce

Hover to see the unexpected NaN tooltip.

  tooltip: {
    trigger: 'axis',
    formatter: (p) => p[0].name,
    show: true
  },

the item selection is broken too.
Clicking an item will select all items in the same series.

Current Behavior

the name of the tooltip formatter params is NaN
Clicking an item will select all items in the same series.

Expected Behavior

Show correct category name
Clicking an item selects only that item.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

It was caused by canOmitUnusedDimensions.
when canOmitUnusedDimensions is true

  1. prepareSeriesDataSchema only create necessary dimensions
    截屏2025-01-09 17 23 43
  2. DataStore is still generated with all dimensions.(see the length of _chunks)
    截屏2025-01-09 17 25 23
  3. SeriesData uses _nameDimIdx to reference the data in DataStore.
    Since unnecessrary dimensions are not created, _nameDimIdx is assigned the wrong idx
    截屏2025-01-09 17 33 01
    截屏2025-01-09 17 33 17
  4. SeriesData._nameList is filled with wrong names
    截屏2025-01-09 18 03 42
@Justin-ZS Justin-ZS added the bug label Jan 9, 2025
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant