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

[suggestion] Warning when wrong ChartDataSet is used for view #616

Closed
andheiberg opened this issue Dec 18, 2015 · 2 comments
Closed

[suggestion] Warning when wrong ChartDataSet is used for view #616

andheiberg opened this issue Dec 18, 2015 · 2 comments

Comments

@andheiberg
Copy link

This is obviously my fault, but I had quite a lot of problems making sample code work as I had put LineChartView in my storyboard and my sample code was trying to set a BarChartDataSet.

The reason this threw me off is that everything but the data visualization loads. So you can click on a point and get the correct data, you just can't see the bar. So I was clueless as to what the problem was. If it had said "no data loaded" or "Data of incorrect type loaded" it would have been easy to debug :)

@liuxuan30
Copy link
Member

I guess it is not a very common case ( you are the first one I guess), since you already knows there are bar chart data set and lines'. Debugging such issues should not be a huge overload. You will get faster when you used several times.

It will also crash if you feed incorrect dataSets, when you encounter forcr casting 'as!' to a wrong class.

If we see more coming, we will think about it.

@andheiberg
Copy link
Author

Yeah just a thought. Did take me quite a while to spot :)

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