-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Testing AxisDependency before using the data #843
Testing AxisDependency before using the data #843
Conversation
I'm actually not sure that we should pollute the console here. |
Do you have an example in this framework how to show that warning without polluting the console? |
We have no way to know if it's a mistake. Therefore no warning... |
It's not even possible (to my knowledge) to do conditional warning like "if you're in debug mode", because those macros get compiled and removed when building the Framework release. |
Thank you for your feedback! I agree there is a usecase where developer dont want to show axis but want to show data. So always printing a warning would not be a good solution! Just one question: Print should only write to console when its in debug mode or do I have a misunderstanding in context of frameworks? |
I don't really know. From my experience console log works in prouction also. In objc projects I use macros to disable logs in release build. It's possible that it's different in Swift- but still it's too much verbosity... |
Swift's print function works differently. It does not actually print to the device logs like NSLog does. Could |
A |
You are right, the developer might have disabled the axis because he just dont want to see it. Thinking about the topic deeply, I find no condition in which we can say: "The chart-config is invalid!". So you are right in closing the pull request. |
If disabling a YAxis and not setting the datasets AxisDependency correct, there could be strange behaviour (see #665). This change will notify the developer of wrong dataset-settings.