当yAxis为time类型时,tooltip中不能正常显示time的数据
配置项如下
app.title = '折柱混合';
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
toolbox: {
feature: {
dataView: {show: true, readOnly: false},
magicType: {show: true, type: ['line', 'bar']},
restore: {show: true},
saveAsImage: {show: true}
}
},
legend: {
data:['蒸发量','降水量','平均温度']
},
xAxis: [
{
type: 'category',
data: ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
axisPointer: {
type: 'shadow'
}
}
],
yAxis: [
{
type: 'time',
name: '水量',
axisLabel: {
formatter: '{value} ml'
}
}
],
series: [
{
name:'蒸发量',
type:'bar',
data:[new Date(),new Date(),new Date(),new Date(),new Date() ],
}
]
};