With dataZoom displaying data per second for 24 hours of the day, dataZoom cannot display thumbnails, and tooltip does not display data. #16108
Labels
invalid
This issue was not created using the issue template.
`
var dom = document.getElementById("container");
var myChart = echarts.init(dom);
var app = {};
var option;
const times = []
const second = 86400
const initStart = new Date(new Date().toLocaleDateString()).getTime()
const data = {
[initStart]: [initStart, 100],
[initStart + 400000]: [initStart + 400000, 120],
[initStart + 1000000]: [initStart + 1000000, 130],
[initStart + 2000000]: [initStart + 2000000, 160],
[initStart + 3000000]: [initStart + 3000000, 10],
}
let start = initStart
for (let i = 0; i < second; i++) {
if (!!data[start]) {
times.push(data[start])
} else {
times.push([start, null])
}
start += 1000
}
const colors = ['#5470C6', '#EE6666'];
option = {
color: ['#2db7f5'],
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line',
animation: false,
label: {
backgroundColor: '#505765',
},
},
},
xAxis: {
type: 'time',
splitNumber: 12,
minInterval: 30 * 60 * 1000,
maxInterval: 60 * 60 * 1000,
axisLabel: {
formatter: '{HH}:{mm}',
showMinLabel: true,
showMaxLabel: true,
hideOverlap: true,
},
},
dataZoom: [
{
type: 'slider',
start: 0,
end: 25,
minValueSpan: 30 * 60 * 1000,
},
],
yAxis: {
type: 'value',
name: '功率(kW)',
},
series: [
{
data: times,
type: 'line',
smooth: true,
symbol: null,
symbolSize: 0,
connectNulls: true,
markPoint: {
symbolSize: 40,
data: [
{ xAxis: initStart, yAxis: 100 },
{ xAxis: initStart + 400000, yAxis: 120 },
// { xAxis: initStart + 1000000, yAxis: 130 },
{ xAxis: initStart + 2000000, yAxis: 160 },
{ xAxis: initStart + 3000000, yAxis: 10 },
],
label: {
show: false,
},
itemStyle: {
color: '#d9001b',
borderWidth: 1,
borderColor: '#fff',
shadowColor: '#333',
shadowBlur: 5,
},
},
},
],
// style: { height: 800 },
// opts: { locale: 'FR' },
}
if (option && typeof option === 'object') {
myChart.setOption(option);
}
The text was updated successfully, but these errors were encountered: