您的位置:首页 > 其它

echarts timeline 设置多个点,却只显示一个

2017-01-12 00:56 169 查看

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类型,默认模式是时间类型,时间轴间隔根据时间跨度自动计算。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  timeline echarts2