Skip to content

[Bug] candlestick chart combined with markLine exception #21300

Closed

Description

@xmatthias

Version

latest / playground

Link to Minimal Reproduction

reproduction

Steps to Reproduce

  • Use a candlestick chart with endoce, where x is not 0
  • add markLine within view
  • observe nothing is shown
  • open browser console in devtools
  • Look at the rendered error.

Current Behavior

Crash, no candle is shown

Logs in the browser console:

VM2393 about:srcdoc:1 failed to run code TypeError: Cannot read properties of undefined (reading 'ordinalMeta')
    at t.getOrdinalMeta (echarts.min.js:45:151210)
    at t._getCategory (echarts.min.js:45:245774)
    at D_ (echarts.min.js:45:251026)
    at P_ (echarts.min.js:45:251677)
    at t._doInit (echarts.min.js:45:245079)
    at t.initData (echarts.min.js:45:243066)
    at echarts.min.js:45:895623
    at e.renderSeries (echarts.min.js:45:895756)
    at echarts.min.js:45:889914
    at e.<anonymous> (echarts.min.js:45:126314)

Expected Behavior

Candlechart renders with lines drawn on top.

That's already the case in the following example - which has only a couple lines different, namely the timestamp is generated at position 0 - and all X encodings are consequently set to 0, too.

working sample

Environment

- OS:linux
- Browser: chromium
- Framework: echarts playground

Any additional comments?

This kindof negates the possibility to have encode - if we're forced to have certain parameters at certain locations in a chart.

Activity

  1. added
    en
    pending
    on Oct 2, 2025
  2. helgasoft commented on Oct 3, 2025

    @helgasoft

    obvious bug, apparently limited to candlestick series with a markLine. Problem is not with encode since it works fine without a markLine. So the bug comes from markLine.
    Parent series candlestick Y-data consists of four values instead of just one. So I suspect a confusion on how to interpret the markLine Y value leads to the ordinalMeta error.
    Workaround - add an invisible scatter series and attach all markLines to it - Demo.

  3. kateEcobb commented on Oct 7, 2025

    @kateEcobb

    I'm also getting this error on barchart series using datasets. Link to reproduction: https://codesandbox.io/p/sandbox/6q4d69

    Note, you'll have to set renderMarkline to true (in the sandbox) in order to see the error.

  4. helgasoft commented on Oct 7, 2025

    @helgasoft

    @kateEcobb, I see the bug showing up in your bar series. I could not identify the reason, but same workaround with scatter works - Demo.
    In simpler scenarios bars with markLine display correctly - Demo, an enigma 🔮

  5. mikkurogue commented on Oct 31, 2025

    @mikkurogue

    We had this bug also show up on a Multiseries chart with 2 lines and a bar series, the workaround is also to add an invisible scatter series to the configuration but feels more like a hack

  6. mikkurogue commented on Nov 3, 2025

    @mikkurogue

    I've done some preliminary low effort debugging and testing, and it seems to somehow only throw the error when using series.encode as an option. as soon as I remove series.encode the error doesn't throw - though the markline is still not there (likely due to some reason that the dimension it's meant to be on doesnt parse properly)

    I'm still looking into it to see if theres any fix I can potentially provide, even as just a starting point for a maintainer to look into.

  7. helgasoft commented on Dec 8, 2025

    @helgasoft

    Another workaround is to set the X axis data as first column - Demo

  8. added
    regression
    and removed
    pending
    on Dec 20, 2025
  9. plainheart commented on Dec 20, 2025

    @plainheart
    Member

    The error Cannot read properties of undefined (reading 'ordinalMeta') should be due to the changes introduced in #20682. I have opened a PR #21439 to fix it.

  10. added
    regression
    and removed
    regression
    on Dec 20, 2025
  11. 100pah commented on Dec 21, 2025

    @100pah
    Member

    Fixed in #21439

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenregressiontopic: datasettopic: marker

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions