Open merlin-li opened 3 years ago
BizCharts Version: 4.0.16 Platform: Antd Mini Showcase(like screenshots): 如何处理不连续的时间问题?
如果传给的时间是连续的,譬如: [{ "time": 1616632500, "hashrates": [] }, { "time": 1616632800, "hashrates": [] }, { "time": 1616633100, "hashrates": [] }, { "time": 1616633400, "hashrates": [{ "currency": "ETH", "value": 261000000 }], "power": 664 }, { "time": 1616633700, "hashrates": [] } ] 如果中奖有一段数据为空,就会显示出下面的效果(这是正常的预期)
但是如果没有中间的空数据,画出的折线就会是连续的:
请问有没有可以控制的方法,如果传入的时间是不连续的,可以让X轴的间隔是一致的,不会出现类似下面的情况,前面一段是1年,中间没有数据,间隔就变成了3年。
forck and create a demo: https://bizcharts.net/product/BizCharts4/demo/306
同问
BizCharts Version: 4.0.16 Platform: Antd Mini Showcase(like screenshots): 如何处理不连续的时间问题?
如果传给的时间是连续的,譬如: [{ "time": 1616632500, "hashrates": [] }, { "time": 1616632800, "hashrates": [] }, { "time": 1616633100, "hashrates": [] }, { "time": 1616633400, "hashrates": [{ "currency": "ETH", "value": 261000000 }], "power": 664 }, { "time": 1616633700, "hashrates": [] } ] 如果中奖有一段数据为空,就会显示出下面的效果(这是正常的预期)
但是如果没有中间的空数据,画出的折线就会是连续的:
请问有没有可以控制的方法,如果传入的时间是不连续的,可以让X轴的间隔是一致的,不会出现类似下面的情况,前面一段是1年,中间没有数据,间隔就变成了3年。
forck and create a demo: https://bizcharts.net/product/BizCharts4/demo/306