Fix build on Windows.

This commit is contained in:
John Preston
2024-04-01 10:19:18 +04:00
parent 3e968aecc8
commit f95817861a
4 changed files with 6 additions and 5 deletions

View File

@@ -61,7 +61,8 @@ Data::StatisticalChart StatisticalChartFromJSON(const QByteArray &json) {
line.isHiddenOnStart = ranges::contains(hiddenLines, columnId);
line.y.resize(length);
for (auto i = 0; i < length; i++) {
const auto value = array.at(i + 1).toInteger();
const auto value = int(base::SafeRound(
array.at(i + 1).toDouble()));
line.y[i] = value;
if (value > line.maxValue) {
line.maxValue = value;