antvis/G2


The issue has been closed
[Bug]: 折线图x轴为日期时,scale的domain失败 #6700
583849487 posted onGitHub
Describe the bug / 问题描述
用g2最新版5.2.0中遇到的,后端给的data结构为如下:{"time": "03-14 14:00", "type": "PM10", "value": 56 }……,有个需求是将x轴从3.1到3.31,但后端给的只有三月份部分时间数据,所以看了文档使用scale的domain方法去实现,但是在操作过程中没有成功,请大佬帮看下问题。感谢
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
如果不用scale部分代码,正常是这样
Version / 版本
Please select / 请选择
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他