Lerchar opened a new issue #13160:
URL: https://github.com/apache/incubator-echarts/issues/13160
### Version
4.8.0
### Steps to reproduce
let num = 0.0001;
let stdXValue = 4568427.032681329;
let monitorDatetimeList = [20200723, 20200724, 20200725, 20200726, 20200727,
20200728, 20200729, 20200730, 20200731, 20200801, 20200802, 20200803, 20200804,
20200809, 20200812, 20200813, 20200814, 20200815, 20200816, 20200817, 20200818];
let xDataList = [4568427.031744561, 4568427.031728287, 4568427.031607979,
4568427.031843972, 4568427.03195076, 4568427.0318019325, 4568427.03171973,
4568427.032136781, 4568427.032400689, 4568427.032083415, 4568427.031947588,
4568427.03199373, 4568427.031979471, 4568427.032845392, 4568427.032563539,
4568427.032754779, 4568427.03292488, 4568427.032971334, 4568427.032924642,
4568427.03295147, 4568427.032766026];
let stdXValueDataList = [];
for(var i = 0, len = monitorDatetimeList.length; i < len; i ) {
num = 0.0001;
// stdXValueDataList.push(stdXValue num);
stdXValueDataList.push(stdXValue);
}
option = {
titletooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#283b56',
formatter: (dataItem, index) => {
if (dataItem.axisDimension === "x") {
return
numberFormatToDateForPeriodicity(dataItem.value, optionsSelected)
} else {
return dataItem.value.toFixed(4);
}
}
},
},
},
legend: {
data:['南北向测量值', '南北向基准值'],
},
toolbox: {
show: false,
feature: {
dataView: {readOnly: false},
restore: {},
saveAsImage: {}
}
},
dataZoom: {
type: "slider",
show: true,
start: 0,
end: 10,
realtime: true,
xAxisIndex: [0]
},
xAxis: [
{
type: 'category',
name: '测量时间',
data: monitorDatetimeList
}
],
yAxis: [
{
type: 'value',
scale: true,
name: '单位(米)',
axisLabel: {
formatter: (value, index) => {
return value.toFixed(4);
}
},
}
],
series: [
{
name: '南北向测量值',
type: 'line',
smooth: true,
animation: true,
color: 'rgb(24, 144, 255)',
data: xDataList
},
{
name: '南北向基准值',
type: 'line',
smooth: true,
animation: true,
color: 'rgb(37, 218, 68)',
data: stdXValueDataList
},
]
};
### What is expected?
The animation of green line is working by used the slider when slide a
little;
### What is actually happening?
I have two lines in one chart. If the 'stdXValueDataList' data is not
changed, the animation is wrong when I used the slider, but if the data
changed, the animation work.
<!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
<!-- This issue is in English. DO NOT REMOVE -->
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]