1 import moment from 'moment'; moment(parseInt(value)).format('HH:mm:ss')
2
http://www.echartsjs.com/gallery/editor.html?c=doc-example/candlestick-axisPointer
坐标的格式化,
tip的格式化,tip与横坐标的格式化
坐标axisLabel; tip与坐标交点axisPointer; xAxis: [ { axisLabel: { show: true, formatter: (value) => { return moment(parseInt(value)).format('HH:mm'); }, }, axisPointer: { show: true, label: { formatter: (value) => { return moment(parseInt(value)).format('HH:mm:ss'); }, }, }, }, ],
tooltip: { trigger: 'axis', formatter(params) {}}