Skip to content

Commit

Permalink
fix min=-1 for mt charts
Browse files Browse the repository at this point in the history
  • Loading branch information
kambizzandi committed Nov 28, 2022
1 parent 8164b21 commit 86ccd69
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ModuleHelpers/MT/Interfaces/intfMTCharts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -898,27 +898,27 @@ QVariant baseintfMTCharts::remainedDataForProgressBar(
Title = TitleParts.join(" - ");
}

quint32 Min;
qint32 Min;
quint32 Max;
quint32 Value;

// if (it->Remained == -1)
if (it->Credit == -1) {
Min = -1;
Max = 1;
Value = 0;
Max = 1;
} else if ((it->Credit == 0) || (it->Remained == 0)) {
Min = 0;
Max = 1;
Value = 1;
Max = 1;
} else if (it->Remained == -1) {
Min = 0;
Max = it->Credit;
Value = 0;
Max = it->Credit;
} else {
Min = 0;
Max = it->Credit;
Value = it->Remained; //(quint32)(((double)it->Remained * 100.0) / (double)it->Credit);
Max = it->Credit;
}

Result.append(QVariantMap({
Expand Down

0 comments on commit 86ccd69

Please sign in to comment.