Skip to content

Conversation

@mikkurogue
Copy link

@mikkurogue mikkurogue commented Nov 3, 2025

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Fixes a type error that causes ordinalMeta to be undefined when used on encoded axes with series.encode.

Fixed issues

Details

Before: What was the problem?

When defining a markline within a series that uses the series.encode option, a type error would be thrown that ordinalMeta is undefined. It seems like due to this axis encoding, the series can not figure out the correct dimension to use for a markline. I feel its the same for markarea too.

After: How does it behave after the fixing?

In the initial case reported in issue #21300 I used the broken example as input and created a test html file to render the chart, and I noticed the marklines appearing again without needing to use a workaround of an empty/invisible scatter series.

Document Info

One of the following should be checked.

  • This PR doesn't relate to document changes
  • The document should be updated later
  • The document changes have been made in apache/echarts-doc#xxx

Misc

Security Checking

  • This PR uses security-sensitive Web APIs.

ZRender Changes

  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

test/markLine-dataset-encode-fix.html
test/ut/spec/component/marker.test.ts

Merging options

  • Please squash the commits into a single one when merging.

Other information

If anything needs to be changed or updated, please let me know. This is a bug affecting my workplace too so I felt I'd follow the ffmpeg motto of "Talk is cheap, send patches".

Thanks.

…defined causing a type error

Signed-off-by: mikkurogue <michael.lindemans@outlook.com>
@echarts-bot
Copy link

echarts-bot bot commented Nov 3, 2025

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

@maeln
Copy link

maeln commented Nov 13, 2025

This affect our usage of EChart so this fix is very much appreciated 🙏 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants