xAxis: {
type: "time",
//min: new Date("开始时间"),
//max: new Date("结束时间"),
axisLabel: {
interale: 0,
rotate: -40, //设置日期显示样式(倾斜度)
formatter: function (value) {
//在这里写你需要的时间格式
var t_date = new Date(value);
return [t_date.getFullYear(), t_date.getMonth() + 1, t_date.getDate()].join('-')
// + " " + [t_date.getHours(), t_date.getMinutes()].join(':'); 时分
}
}
},
The date of echarts x-axis is displayed as year, month and day
Guess you like
Origin blog.csdn.net/weixin_46319117/article/details/116536739
Recommended
Ranking