EN: Display 0 RPIs as none in graph

This commit is contained in:
Marvin W 2020-09-27 15:27:21 +02:00
parent 6afcca0396
commit 7601b37ee4
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class ExposureNotificationsRpisFragment : PreferenceFragmentCompat() {
}
histogramCategory.title = getString(R.string.prefcat_exposure_rpis_histogram_title, totalRpiCount)
histogram.labelsFormatter = { it.roundToInt().toString() }
histogram.scale = Scale(0f, rpiHistogram.values.max() ?: 0f)
histogram.scale = Scale(0f, rpiHistogram.values.max()?.coerceAtLeast(0.1f) ?: 0.1f)
histogram.data = rpiHistogram
}
}