alibaba / BizCharts

Powerful data visualization library based on G2 and React.
http://bizcharts.net/products/bizCharts
6.17k stars 671 forks source link

数据不连续问题 #1376

Open merlin-li opened 3 years ago

merlin-li commented 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": [] } ] 如果中奖有一段数据为空,就会显示出下面的效果(这是正常的预期) image

但是如果没有中间的空数据,画出的折线就会是连续的: image

请问有没有可以控制的方法,如果传入的时间是不连续的,可以让X轴的间隔是一致的,不会出现类似下面的情况,前面一段是1年,中间没有数据,间隔就变成了3年。 image

forck and create a demo: https://bizcharts.net/product/BizCharts4/demo/306

liuchangliang commented 3 years ago

同问

haohuaZhang commented 1 year ago

同问