Hi,
My data structure is as below after query[ { "day": 1, "sum": 40 }, { "day": 20, "sum": 40 } ]
So I would like to have chart fill in those middle days (day 2, day 3, day 4 .....) with value of "sum" : 0. So that the line chart can display correctly. Any method?
Currently it is like this
2条答案
按热度按时间i2loujxw1#
Have you set the maximum and minimum in Chart Components scale prop。
ldxq2e6h2#
Yes I added the scale props with
scale={{ value: { min: 0, max: 10000 } }}
It's still not working. While what I do know by default I need to have data sets for day 2, day 3, but I not sure how to do that