echarts
echarts copied to clipboard
阶梯图会变成折线图
问题简述 (One-line summary)
我用echart做了一个阶梯图,用来显示0和1,即Bool值的图,但是显示一会后会自动变成折线图,目前发现稳定会变的是按F12进入调试模式的时候。
版本及环境 (Version & Environment)
- ECharts 版本 (ECharts version): 3.2.2
- 浏览器类型和版本 (Browser version): Chrome
- 操作系统类型和版本 (OS Version): win10
可能哪里有问题 (What went wrong)
样式问题?
ECharts配置项 (ECharts option)
option = {
"title": {
"subtext": "",
"x": "center"
},
"tooltip": {
"trigger": "axis",
"axisPointer": {
"animation": false
}
},
"toolbox": {
"feature": {
"saveAsImage": {}
}
},
"xAxis": [
{
"type": "category",
"boundaryGap": false,
"axisLine": { "onZero": true },
"splitLine": {"show":false},
"data": [
]
}
],
"series": [
{
"type": "line",
"step": "end",
"symbolSize": 8,
"data": [
]
}
],
"animation": false,
"yAxis": [
{
"type": "value",
"minInterval": 1,
"splitNumber":1,
"data": ["0", "1"],
"min": 0,
"max": 1
}
],
"dataZoom": {
"show": false,
"height": 30,
"realtime": true,
"handleColor": "#00932a",
"start": 0,
"end": 100
},
"color": ["#87D200", "#FFCC00"],
"grid": {
"x": 60,
"y": 30,
"x2": 60,
"y2": 80
}
}
其他信息 (Other comments)
应该是 animation: false 时重新刷新产生的 bug
"axisPointer": { "animation": true } 改成true了还是会变,还是说是改其他地方?现在发现点toolbox里的save as image也会变折线
option.animation
OK,fixed. Thank you~