-
-
Notifications
You must be signed in to change notification settings - Fork 682
Description
i have encountered an issue with react-native-chart-kit when rendering multiple datasets that include null values at the beginning or end. This leads to an unintended line being drawn between the datasets, when one dataset ends with a number and the next dataset begins with null values, the chart draws a line connecting the last valid point of the first dataset to the first non-null point of the second dataset. However, if the order is reversed—placing the dataset with leading nulls first—the line break is rendered correctly.
Example:
// This results in an incorrect line connection:
[ [100, 91.67, 88.57, 54.29, 70], [null, null, 100, 0, 0] ]
// This renders correctly:
[ [null, null, 100, 0, 0], [100, 91.67, 88.57, 54.29, 70] ]
This might be an issues in LineChart under renderLine()