echarts Candle stick series is not plotting when the same values are given for the "y" attribute in the encode object

ryevplcw  于 4个月前  发布在  Echarts
关注(0)|答案(1)|浏览(51)

Version

5.4.2

https://echarts.apache.org/examples/en/editor.html?c=candlestick-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5JALZW0kC-ANCeTvkUhyQAmAQzDC8VMEQDaJdKlKk8wAK4AnAMY1YsxYoV7FwogCYADJ0OKARkQDMAFktX0GogEYLcq4PsAOZxcRMG1ac3cAdgBaTyiTBxYXARcDF2NYBy8XdFtYOwBWQKs3PKzs31h8sqDRUPDo2JN8xKtkq1SrdLt3IsNcuwDvQxK7O169CocnIYnaunqYsziANhbDNsMOwy7B7Nhc90KZxRKjvcmTccVgurNIxbiItb1WGYBdb1f0N-cJNQgqIQdN4tmRKKENMJoIIADaAyAaADWtHGVGgGmAgm0oPQGDoNxRx1g5BktGEKNgtGsFKpNMEtDesAA9EzYAALKhqKj7WD4WAAcwgADc0WQAO4QLSwdgQABmsDF3MFItgGl5YDwCuAakREGg_NgMy-pGNH1YAG4gA

Steps to Reproduce

  1. create a candle stick series
  2. in series level in encode object in "y" property give same values
  3. series: [
    {
    type: 'candlestick',
    encode: {
    x: 'date',
    y: ['a', 'b', 'b', 'd'] // here b is given twice ,if we give c its working
    }
    }
    ]

Current Behavior

chart is not getting plotted

option = {
xAxis: {
type: 'time'
},
yAxis: {},
dataset: [
{
source: [
{
a: 20,
b: 34,
c: 10,
d: 38,
date: '2017-10-24'
},
{
a: 40,
b: 35,
c: 30,
d: 50,
date: '2017-10-25'
},
{
a: 31,
b: 38,
c: 33,
d: 44,
date: '2017-10-26'
},
{
a: 38,
b: 15,
c: 5,
d: 42,
date: '2017-10-27'
}
]
}
],
series: [
{
type: 'candlestick',
encode: {
x: 'date',
y: ['a', 'b', 'b', 'd'] // here b is given twice ,if we give c its working
}
}
]
};

Expected Behavior

chart should be plotted

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

iqxoj9l9

iqxoj9l91#

It is questionable whether this is a bug or not.
Even if accepted as bug, chance of someone fixing it is very low. Because the original purpose of encode is to supply different (not identical) pointers.
To me, this issue is a typical candidate for "close as not planned".

相关问题