mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-26 15:47:19 +02:00
Bug
- Corrected rounding errors on burndown chart bar size calculations (thanks to Uli Martens).
This commit is contained in:
parent
a73c711188
commit
6100748511
2 changed files with 9 additions and 7 deletions
|
@ -12,6 +12,8 @@ Bugs
|
||||||
+ Fixed grammar in feedback string (thanks to Uli Martens).
|
+ Fixed grammar in feedback string (thanks to Uli Martens).
|
||||||
+ Addressed valgrind complaints (thanks to Bryce Harrington).
|
+ Addressed valgrind complaints (thanks to Bryce Harrington).
|
||||||
+ Removed default configuration value for the obsolete 'annotations' setting.
|
+ Removed default configuration value for the obsolete 'annotations' setting.
|
||||||
|
+ Corrected rounding errors on burndown chart bar size calculations (thanks to
|
||||||
|
Uli Martens).
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|
|
@ -518,18 +518,18 @@ std::string Chart::render ()
|
||||||
// If it fits within the allowed space.
|
// If it fits within the allowed space.
|
||||||
if (bar.offset < actual_bars)
|
if (bar.offset < actual_bars)
|
||||||
{
|
{
|
||||||
int pending = (bar.pending * graph_height) / labels[2];
|
int pending = ( bar.pending * graph_height) / labels[2];
|
||||||
int started = (bar.started * graph_height) / labels[2];
|
int started = ((bar.pending + bar.started) * graph_height) / labels[2];
|
||||||
int done = ((bar.done + carryover_done) * graph_height) / labels[2];
|
int done = ((bar.pending + bar.started + bar.done + carryover_done) * graph_height) / labels[2];
|
||||||
|
|
||||||
for (int b = 0; b < pending; ++b)
|
for (int b = 0; b < pending; ++b)
|
||||||
grid.replace (LOC (graph_height - b, max_label + 3 + ((actual_bars - bar.offset - 1) * 3)), 2, "PP");
|
grid.replace (LOC (graph_height - b, max_label + 3 + ((actual_bars - bar.offset - 1) * 3)), 2, "PP");
|
||||||
|
|
||||||
for (int b = 0; b < started; ++b)
|
for (int b = pending; b < started; ++b)
|
||||||
grid.replace (LOC (graph_height - b - pending, max_label + 3 + ((actual_bars - bar.offset - 1) * 3)), 2, "SS");
|
grid.replace (LOC (graph_height - b, max_label + 3 + ((actual_bars - bar.offset - 1) * 3)), 2, "SS");
|
||||||
|
|
||||||
for (int b = 0; b < done; ++b)
|
for (int b = started; b < done; ++b)
|
||||||
grid.replace (LOC (graph_height - b - pending - started, max_label + 3 + ((actual_bars - bar.offset - 1) * 3)), 2, "DD");
|
grid.replace (LOC (graph_height - b, max_label + 3 + ((actual_bars - bar.offset - 1) * 3)), 2, "DD");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue