-
-
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
Show empty Chart when there are no data #975
Comments
I am not one of the authors of the library, but in the demo, I see that there is this setting: Perhaps if you detect the chart is empty, you could set an empty value to get the chart to draw. |
The problem is I don't want to paint 0's, because currently I'm adding Maybe I taking the fact of empty values wrong, what do you mean exactly Thanks
|
I actually meant adding just one value of 0 (and configure all other things so that it won't draw things.) However, I just tried this: |
If you don't have any data, the axis range will be displayed as 0-1, which may be meanless. Currently, there is a check to make sure you have data before calculation. If you really want the axis displayed, you have to delete those checks, starting from data setter and drawRect |
Hi @liuxuan30 when you mean I was checking here but I'm not really sure. @dxclancy I tried with the demo and to change that you commented, as you said it's showing the chart. I tried in my one but shows the message instead of the char: I will try to know what is different. Thanks |
Thanks both, in the end I could check the new version of the library is not showing the message. I wasn't using the new version due to a (problem with translations in XCode 7.3) |
Hi I'm working with LineChartData and I would like to show the axis even when there are not data in the chart, in my case:
I don't want to show the message:
You need to provide data for the chart. No chart data available
Thanks
The text was updated successfully, but these errors were encountered: