-
-
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
no data available #585
Comments
well, by default, it it's the first time you load the chart, it will not draw anything. Do you take some actions, like filtering the data leads to no data? set
{
if (newValue == nil || newValue?.yValCount == 0) <-- yours may be if (newValue == nil)
{
print("Charts: data argument is nil on setData()", terminator: "\n")
return
}
_dataNotSet = false
_offsetsCalculated = false
_data = newValue
// calculate how many digits are needed
calculateFormatter(min: _data.getYMin(), max: _data.getYMax())
notifyDataSetChanged() <-- this will trigger a redraw
} I would say there might be a problem that, if we filter the data and it's then empty, it will not trigger a redraw so lines and bars are still there? @danielgindi |
I actually think that it should always not draw only when |
@danielgindi there is one scenario: if we have a filter, when filting 'all', it show 10 bars, and if we filt and lead it to no data, currently, the bars are still there. Would it be better to do a redraw and show nothing? Like leave an empty axis, range from [0,1]. |
Well with the latest commits- it will be more controllable, to the developer's opinion. As long as So if you've filtered your data and got zero results- you could pass in a With previous versions this was not possible due to the |
Can we hide grid lines, x values etc. when data is not available to the chart? If yes, is there a configuration available or will need to modify code?
The text was updated successfully, but these errors were encountered: