Version
5.3.1
Link to Minimal Reproduction
https://codesandbox.io/s/echarts-category-83rl4d?file=/src/index.js
Steps to Reproduce
- Create a simple line chart with the following options
import * as echarts from "echarts";
const chart = echarts.init(document.getElementById("chart"));
const options = {
animation: false,
xAxis: {
type: "category",
splitLine: { show: true },
data: ["1:00", "2:00", "3:00", "4:00", "5:00"]
},
yAxis: {
type: "category",
axisLabel: {
show: true
},
showMinLabel: true,
showMaxLabel: true,
data: ["A", "B", "C"]
},
series: [
{
type: "line",
data: ["null", "A", undefined, "C", null],
symbol: "circle",
showSymbol: true,
symbolSize: 8,
lineStyle: {
opacity: 0
},
connectNulls: false
}
]
};
chart.setOption(options);
Current Behavior
The chart is rendered correctly with respect to valid values (e.g. the values that are defined in the Y axis data parameter) and "null" (note that null in double quotes as a string) but incorrectly regarding the native JavaScript null value. For instance, in the included example, the last three values are JavaScript native null has been rendered as legit ones with the dots at the value A.
Expected Behavior
The chart should not render any dots regarding the input data null (without double quotes).
Surprisingly, ECharts renders correctly the value "null" (null inside double quotes as a legit JS string, not the native null value).
Another note, ECharts renders correctly if the input data is the native JS undefined value.
Environment
- OS: N/A
- Browser: N/A
- Framework: N/A
Any additional comments?
No response
Version
5.3.1
Link to Minimal Reproduction
https://codesandbox.io/s/echarts-category-83rl4d?file=/src/index.js
Steps to Reproduce
Current Behavior
The chart is rendered correctly with respect to valid values (e.g. the values that are defined in the Y axis
dataparameter) and"null"(note thatnullin double quotes as a string) but incorrectly regarding the native JavaScriptnullvalue. For instance, in the included example, the last three values are JavaScript nativenullhas been rendered as legit ones with the dots at the valueA.Expected Behavior
The chart should not render any dots regarding the input data
null(without double quotes).Surprisingly, ECharts renders correctly the value
"null"(nullinside double quotes as a legit JS string, not the nativenullvalue).Another note, ECharts renders correctly if the input data is the native JS
undefinedvalue.Environment
Any additional comments?
No response