Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.8k views
in Technique[技术] by (71.8m points)

echarts中不连续且间隔不一致的时间如何有规律的显示?

就比如说如何达到Excel中图表的效果?

比如下面这种的表

image.png

很明显上面的日期间隔是不一致的,然后用Excel生成图表的时候,会智能的按照日期间隔空出不一致的间隙,如下图

image.png

很明显,从数据圆点可以看出,是按照日期间隔分布的(而且只在有数据的点显示数据了

但如果直接读取上面Excel的图表,echarts里会间隔一致的显示数据点(哪怕每个时间间隔其实是不一样的)

所以要如何处理上面图表的数据,才能在echarts里达到和上面Excel里图表一样的效果呢?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

不应该啊,x轴不是可以子定义嘛;还有间隔可以设置的,interval设置为0;


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...