You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] candlestick chart combined with markLine exception #21300
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.
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.
@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 🔮
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
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.
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.
Activity
helgasoft commentedon Oct 3, 2025
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.
kateEcobb commentedon Oct 7, 2025
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
renderMarklineto true (in the sandbox) in order to see the error.helgasoft commentedon Oct 7, 2025
@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 🔮
mikkurogue commentedon Oct 31, 2025
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
mikkurogue commentedon Nov 3, 2025
I've done some preliminary low effort debugging and testing, and it seems to somehow only throw the error when using
series.encodeas an option. as soon as I removeseries.encodethe 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.
helgasoft commentedon Dec 8, 2025
Another workaround is to set the X axis data as first column - Demo
plainheart commentedon Dec 20, 2025
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.
100pah commentedon Dec 21, 2025
Fixed in #21439