projects
/
harbour-pedalo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add graph animation; support for line graphs
[harbour-pedalo.git]
/
src
/
statsweekdayave.cpp
diff --git
a/src/statsweekdayave.cpp
b/src/statsweekdayave.cpp
index
63e595e
..
c0bbd2b
100644
(file)
--- a/
src/statsweekdayave.cpp
+++ b/
src/statsweekdayave.cpp
@@
-16,7
+16,7
@@
void StatsWeekdayAve::update() {
int pos;
qDebug() << "Calculating values";
int pos;
qDebug() << "Calculating values";
- values.clear();
+ barvalues.clear();
for (pos = 0; pos < 7; pos++) {
duration[pos] = 0.0;
for (pos = 0; pos < 7; pos++) {
duration[pos] = 0.0;
@@
-41,10
+41,10
@@
void StatsWeekdayAve::update() {
if (result > maxval) {
maxval = result;
}
if (result > maxval) {
maxval = result;
}
- values << result;
+ barvalues << result;
}
}
- step = qRound(maxval / 5.0);
+ step = maxval > 5.0 ? qRound(maxval / 5.0) : (maxval / 5.0);
qDebug() << "Calculated values";
}
qDebug() << "Calculated values";
}