You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When dataset.clear() is called, calcMinMax is skipped when the values count is zero,
there xMin, xMax, yMin, yMax stay as they are and my Y- Axis doesn't scale to the new minimum entries value.
Get an exception when I force the calcMinMax despite value count being zero.
Workaround, I manually clear xMin, xMax, yMin, yMax just after calcMinMax in the .clear() function.
The text was updated successfully, but these errors were encountered:
openoverridefunc calcMinMax(){
if _values.count ==0{return}
_yMax =-Double.greatestFiniteMagnitude
_yMin =Double.greatestFiniteMagnitude
_xMax =-Double.greatestFiniteMagnitude
_xMin =Double.greatestFiniteMagnitude
for e in _values
{calcMinMax(entry: e)}}
if continue, those max and min are just -INF or INF, which are also problematic. If you cleared them up, no data left, how does y axis scale to the "new minimum entries value" then? unless you set outside, but it has nothing to do with the data then. Why clear?
I would say if you have new data, just feed and call notifyDataSetChanged() so it will recalculate everything.
When dataset.clear() is called, calcMinMax is skipped when the values count is zero,
there xMin, xMax, yMin, yMax stay as they are and my Y- Axis doesn't scale to the new minimum entries value.
Get an exception when I force the calcMinMax despite value count being zero.
Workaround, I manually clear xMin, xMax, yMin, yMax just after calcMinMax in the .clear() function.
The text was updated successfully, but these errors were encountered: