Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cryptic error when data array is empty #153

Open
Venryx opened this issue Nov 22, 2016 · 2 comments
Open

Cryptic error when data array is empty #153

Venryx opened this issue Nov 22, 2016 · 2 comments

Comments

@Venryx
Copy link

Venryx commented Nov 22, 2016

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.

@Venryx
Copy link
Author

Venryx commented Nov 23, 2016

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.

@tomauty
Copy link
Owner

tomauty commented Jul 7, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants