Cryptic error when data array is empty
When data array is empty, eg:
render() {
return (
<View style={styles.container}>
<Chart style={styles.chart} type="line" verticalGridStep={5}
showDataPoint={true} color="black" data={[]}/>
</View>
);
}
This very cryptic/uninformative/misleading error occurs: http://i.imgur.com/kZcS21w.png
"Error calling function: AppRegistry:runApplication"
Took me like an hour to track it down. (partly because I had made a number of other project changes in the same session, and thought it was due to those changes instead of the above one)
I'd think that either a better error message should be shown, or it should be able to handle an empty data array without error in the first place.
On further analysis, the error may have been caused by an interaction between the above change and the others mentioned.
I really don't want to go back to check... (was enough of a headache getting things working again), so if this doesn't occur for other people, it was probably just an issue with my project and can be ignored.
As a generic FYI — I am no longer able to maintain this library. I recommend checking out victory-native as it's much more maintained.