xanderdeseyn / react-native-responsive-linechart

A customizable and responsive line or area chart for react-native
https://react-native-responsive-linechart.surge.sh
MIT License
205 stars 48 forks source link

Exception thrown when having 0 or 1 data point in `<Area>` and `<Line>` #157

Open Livijn opened 2 years ago

Livijn commented 2 years ago

I am getting an exception thrown when having 0 or 1 data point in <Area> and <Line>. It works when the data set is >= 2.

Here is the exception:

Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.

[[129,129,129,119],[5,5,5,1],[[4235,"RNSVGPath",71,{"d":"M NaN 59 L NaN 118 L NaN 118","propList":["fill","strokeWidth"],"strokeWidth":"0","fill":[1,"grad0.9984082999"]}],[4237,"RNSVGPath",71,{"d":"M NaN 59","mask":"Mask","propList":["fill","stroke","strokeWidth","strokeOpacity","strokeLinecap"],"strokeLinecap":1,"strokeOpacity":1,"stroke":4290763774,"strokeWidth":3,"fill":null}],[1]],7269]

erfinbadrian commented 2 years ago

Field sizes are different.

Make sure your data is with same length.