From bc5754584e9e2f34fac2a81ec6bff507e058debb Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 24 Apr 2016 10:27:52 -0400 Subject: [PATCH] CmdReportDay: Renders report axis --- src/commands/CmdReportDay.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/commands/CmdReportDay.cpp b/src/commands/CmdReportDay.cpp index 0466237a..09fe05cf 100644 --- a/src/commands/CmdReportDay.cpp +++ b/src/commands/CmdReportDay.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -55,7 +56,8 @@ int CmdReportDay ( palette.initialize (rules); palette.enabled = rules.getBoolean ("color"); - Color colorExc (palette.enabled ? rules.get ("theme.colors.exclusion") : ""); + Color colorExc (palette.enabled ? rules.get ("theme.colors.exclusion") : ""); + Color colorLabel (palette.enabled ? rules.get ("theme.colors.label") : ""); // Map tags to colors. auto tag_colors = createTagColorMap (rules, palette, tracked); @@ -83,13 +85,11 @@ int CmdReportDay ( // Render the axis. std::string indent = " "; - std::cout << '\n' - << indent - << "0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11\n"; + std::cout << indent; + for (int hour = first_hour; hour <= last_hour; hour++) + std::cout << colorLabel.colorize (leftJustify (hour, 5)); - // TODO Data, missing. - std::cout << '\n' - << '\n'; + std::cout << '\n'; // TODO Summary, missing. std::cout << '\n'