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

来源:互联网 发布:中银淘宝校园卡过期 编辑:程序博客网 时间:2024/05/17 07:30

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类型,默认模式是时间类型,时间轴间隔根据时间跨度自动计算。

1 0
原创粉丝点击