Version
5.3.3
Link to Minimal Reproduction
https://codesandbox.io/s/optimistic-zhukovsky-j1bbn2?file=/src/index.js
Steps to Reproduce
just open the link then will get 2 error, both are Cannot read properties of undefined (reading '0')
but if change the dataset's open1 to open, and change the dimensions's open1 to open, the slider zoom component will render and no error.
Current Behavior
if secend dimension is not open, the slider zoom component not render and throw errors
Expected Behavior
render zoom component render with any key of secend dimension
Environment
- OS: Windows 10.0.19041
- Browser: Chrome 102.0.5005.115
- Framework: NEXT.js
Any additional comments?
this will throw errors
const dataList = [
{ date: "2017-10-24", open1: 20, close2: 34, low3: 10, high4: 38 },
{ date: "2017-10-25", open1: 40, close2: 35, low3: 30, high4: 50 },
{ date: "2017-10-26", open1: 31, close2: 38, low3: 33, high4: 44 },
{ date: "2017-10-27", open1: 38, close2: 15, low3: 5, high4: 42 }
];
const option = {
xAxis: [{ type: "category" }],
yAxis: [{ type: "value" }],
series: [{ type: "candlestick" }],
dataset: {
name: "K Line",
source: dataList,
dimensions: ["date", "open1", "close2", "low3", "high4"]
},
dataZoom: [{ type: "slider", xAxisIndex: 0, filterMode: "filter" }]
};
but this will render success
const dataList = [
{ date: "2017-10-24", open: 20, close2: 34, low3: 10, high4: 38 },
{ date: "2017-10-25", open: 40, close2: 35, low3: 30, high4: 50 },
{ date: "2017-10-26", open: 31, close2: 38, low3: 33, high4: 44 },
{ date: "2017-10-27", open: 38, close2: 15, low3: 5, high4: 42 }
];
const option = {
xAxis: [{ type: "category" }],
yAxis: [{ type: "value" }],
series: [{ type: "candlestick" }],
dataset: {
name: "K Line",
source: dataList,
dimensions: ["date", "open", "close2", "low3", "high4"]
},
dataZoom: [{ type: "slider", xAxisIndex: 0, filterMode: "filter" }]
};
Version
5.3.3
Link to Minimal Reproduction
https://codesandbox.io/s/optimistic-zhukovsky-j1bbn2?file=/src/index.js
Steps to Reproduce
just open the link then will get 2 error, both are
Cannot read properties of undefined (reading '0')but if change the dataset's open1 to open, and change the dimensions's open1 to open, the slider zoom component will render and no error.
Current Behavior
if secend dimension is not open, the slider zoom component not render and throw errors
Expected Behavior
render zoom component render with any key of secend dimension
Environment
Any additional comments?
this will throw errors
but this will render success