antvis / G2Plot

:dango: An interactive and responsive charting library based on G2.
https://g2plot.antv.antgroup.com
MIT License
2.56k stars 607 forks source link

🤔 [QUESTION] 在绘制折线图时,x轴是时间序列,如何限定区间范围 #3799

Open zmoth opened 4 months ago

zmoth commented 4 months ago

🐛 Question description [Please make everyone to understand it]

image

如图所示,我希望只显示 9:30 ~ 11:30 和 13:00 ~ 15:00 两段区间的数据。头尾的限制已经使用min和max限制,中间如何隐藏?

 meta: {
  time: {
    type: 'timeCat',
    mask: 'HH:mm',
  },
},
xAxis: {
  nice: false,
  type: 'time',
  min: startDate.getTime(), // 9:30
  max: endDate.getTime(), // 15:00
},

💻 Link to minimal reproduction

Please provide a link by forking these links g2plot or GitHub repo. What is a minimal reproduction, and why is it required?

🏞 Expected result

🚑 Any additional [like screenshots]