react-native-chart-kit
react-native-chart-kit copied to clipboard
I don't want to display null value in LineChart, how do I achieve it?
I am using LineChart for graph integration. In requirement, I don't to show dot or line draw for null value.
- is it possible?
- how to achieve this scenario?
Similar issue here and I'm wondering if anyone has solved it for this library.
For example say I have a line chart of data spanning 1 week. I generated data Monday, Tuesday and Friday, but not other days.
I would love to keep the other days in the X-axis, so my chart reflects the entire week, but have the line chart skip days that are "null" and not treat those as "0" on the chart. In this case that would mean drawing a line directly from Tuesday to Friday, to skip over the missing data of Wednesday and Thursday.
Example below of how it behaves now with [null, null, 1, 1, null, null, 1]

Looking for a solution to this problem as well. I have a chart with 12 months from Jan to Dec on the x axis and with [1 , 2, 3, 4, 5]
as a dataset. The line is spread out from Jan to Sept. Thats 9 month spread with only 5 items data. So I am looking to set my data set as [1, 2, 3, 4, 5, null, null, null, null, null, null, null]
without having the line show as 0 on the y axis for the null values.
Has this been solved?
any updates?
the question is relevant!
Has anyone come up with a solution? Please let us know