版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u014388408/article/details/54358956
echarts2 timeline 设置多个点,却只显示一个
timeline :{
"data": [
"2016-10",
"2016-11",
"2016-12"
],
"lineStyle": {
"color": "#2497be"
},
"controlStyle": {
"itemSize": 20,
"normal": {
"color": "#2497be"
}
},
"label": {
"textStyle": {
"color": "#2497be"
}
},
"autoPlay": false,
"currentIndex": 2,
"playInterval": 15000
}
时间轴,显示正常。
timeline :{
“data”: [
“2016-10”,
“2016-11”,
“2016-12”,
“全年”
],
“lineStyle”: {
“color”: “#2497be”
},
“controlStyle”: {
“itemSize”: 20,
“normal”: {
“color”: “#2497be”
}
},
“label”: {
“textStyle”: {
“color”: “#2497be”
}
},
“autoPlay”: false,
“currentIndex”: 2,
“playInterval”: 15000
}
会导致timeline 只显示一个,如果所有点不全都是正确格式时间点,可以设置type为number类型,默认模式是时间类型,时间轴间隔根据时间跨度自动计算。