我正在尝试将工具提示和 Echarts 的 YAxis 的时间整数(例如 010511)更改为 01:05:11 的人类可读格式。
请注意,这不是时间戳,而是秒表类型的数据,始终从 00:00:00 开始并上升。
以下是 EChart 的当前状态。
<!-- Echart JS CC -->
<script>
var chart = document.getElementById('cc_chart');
var myChart = echarts.init(chart);
var option = {
title: { text: '' },
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
textStyle: {
color: '#fff'
},
grid: {
left: '0',
right: '4%',
bottom: '27%',
top: '4%',
containLabel: true
},
dataZoom: [
{
type: 'inside',
start: 0,
end: 100
}, …Run Code Online (Sandbox Code Playgroud)