diff --git a/NEWS b/NEWS index de7b40085..b6e17f3e2 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,8 @@ New configuration options in taskwarrior 1.9.4 - color.burndown.pending, color.burndown.started and color.burndown.done control the color of the burndown charts. + - burndown.bias, which is a tweakable control for the completion estimation + for the burndown charts, and is documented in taskrc(5). Newly deprecated features in taskwarrior 1.9.4 diff --git a/src/burndown.cpp b/src/burndown.cpp index 1c4418ea2..c888d8c9c 100644 --- a/src/burndown.cpp +++ b/src/burndown.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -52,8 +53,8 @@ public: public: int offset; // from left of chart - std::string major; // x-axis label, major (year/-/month) - std::string minor; // x-axis label, minor (month/week/day) + std::string major_label; // x-axis label, major (year/-/month) + std::string minor_label; // x-axis label, minor (month/week/day) int pending; // Number of pending tasks in period int started; // Number of started tasks in period int done; // Number of done tasks in period @@ -64,8 +65,8 @@ public: //////////////////////////////////////////////////////////////////////////////// Bar::Bar () : offset (0) -, major ("") -, minor ("") +, major_label ("") +, minor_label ("") , pending (0) , started (0) , done (0) @@ -86,8 +87,8 @@ Bar& Bar::operator= (const Bar& other) if (this != &other) { offset = other.offset; - major = other.major; - minor = other.minor; + major_label = other.major_label; + minor_label = other.minor_label; pending = other.pending; started = other.started; done = other.done; @@ -474,7 +475,7 @@ std::string Chart::render () std::sort (bars_in_sequence.begin (), bars_in_sequence.end ()); std::vector ::iterator seq; - std::string major; + std::string major_label; for (seq = bars_in_sequence.begin (); seq != bars_in_sequence.end (); ++seq) { Bar bar = bars[*seq]; @@ -482,12 +483,12 @@ std::string Chart::render () // If it fits within the allowed space. if (bar.offset < actual_bars) { - grid.replace (LOC (height - 5, max_label + 3 + ((actual_bars - bar.offset - 1) * 3)), bar.minor.length (), bar.minor); + grid.replace (LOC (height - 5, max_label + 3 + ((actual_bars - bar.offset - 1) * 3)), bar.minor_label.length (), bar.minor_label); - if (major != bar.major) - grid.replace (LOC (height - 4, max_label + 3 + ((actual_bars - bar.offset - 1) * 3)), bar.major.length (), bar.major); + if (major_label != bar.major_label) + grid.replace (LOC (height - 4, max_label + 3 + ((actual_bars - bar.offset - 1) * 3)), bar.major_label.length (), bar.major_label); - major = bar.major; + major_label = bar.major_label; } } @@ -709,27 +710,27 @@ void Chart::generateBars () case 'D': // month/day { std::string month = Date::monthName (cursor.month ()); - bar.major = month.substr (0, 3); + bar.major_label = month.substr (0, 3); sprintf (str, "%02d", cursor.day ()); - bar.minor = str; + bar.minor_label = str; } break; case 'W': // year/week sprintf (str, "%d", cursor.year ()); - bar.major = str; + bar.major_label = str; sprintf (str, "%02d", cursor.weekOfYear (0)); - bar.minor = str; + bar.minor_label = str; break; case 'M': // year/month sprintf (str, "%d", cursor.year ()); - bar.major = str; + bar.major_label = str; sprintf (str, "%02d", cursor.month ()); - bar.minor = str; + bar.minor_label = str; break; } diff --git a/src/command.cpp b/src/command.cpp index ebfd9075b..0d01725bf 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -891,11 +891,12 @@ int handleShow (std::string& outs) // Note that there is a leading and trailing space, to make it easier to // search for whole words. std::string recognized = - " annotations blanklines bulk calendar.details calendar.details.report " - "calendar.holidays calendar.legend color color.active color.due " - "color.due.today color.blocked color.overdue color.pri.H color.pri.L " - "color.pri.M color.pri.none color.recurring color.tagged color.footnote " - "color.header color.debug color.alternate color.calendar.today " + " annotations blanklines bulk burndown.bias calendar.details " + "calendar.details.report calendar.holidays calendar.legend color " + "color.active color.due color.due.today color.blocked color.burndown.done " + "color.burndown.pending color.burndown.started color.overdue color.pri.H " + "color.pri.L color.pri.M color.pri.none color.recurring color.tagged " + "color.footnote color.header color.debug color.alternate color.calendar.today " "color.calendar.due color.calendar.due.today color.calendar.overdue " "color.calendar.weekend color.calendar.holiday color.calendar.weeknumber " "color.summary.background color.summary.bar color.history.add "