mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdChart: Renamed 'reports.<type>.style=compact' to 'reports.<type>.axis=internal'
This commit is contained in:
parent
bbafe49184
commit
082eca0679
2 changed files with 5 additions and 4 deletions
|
@ -46,6 +46,7 @@ Rules::Rules ()
|
|||
|
||||
// 'day' report.
|
||||
{"reports.day.hours", "all"},
|
||||
{"reports.day.axis", "internal"},
|
||||
{"reports.day.lines", "2"},
|
||||
{"reports.day.spacing", "1"},
|
||||
{"reports.day.month", "no"},
|
||||
|
|
|
@ -132,7 +132,7 @@ int renderChart (
|
|||
|
||||
// Render the axis.
|
||||
std::cout << '\n';
|
||||
if (rules.get ("reports." + type + ".style") != "compact")
|
||||
if (rules.get ("reports." + type + ".axis") != "internal")
|
||||
renderAxis (type,
|
||||
rules,
|
||||
palette,
|
||||
|
@ -443,7 +443,7 @@ static void renderExclusionBlocks (
|
|||
auto chars_per_hour = 60 / cell;
|
||||
|
||||
auto spacing = rules.getInteger ("reports." + type + ".spacing");
|
||||
auto style = rules.get ("reports." + type + ".style");
|
||||
auto axis = rules.get ("reports." + type + ".axis");
|
||||
Color colorExc (palette.enabled ? rules.get ("theme.colors.exclusion") : "");
|
||||
Color colorLabel (palette.enabled ? rules.get ("theme.colors.label") : "");
|
||||
|
||||
|
@ -454,7 +454,7 @@ static void renderExclusionBlocks (
|
|||
Range r (Datetime (day.year (), day.month (), day.day (), hour, 0, 0),
|
||||
Datetime (day.year (), day.month (), day.day (), hour + 1, 0, 0));
|
||||
|
||||
if (style == "compact")
|
||||
if (axis == "internal")
|
||||
{
|
||||
auto label = format ("{1}", hour);
|
||||
int offset = (hour - first_hour) * (chars_per_hour + spacing);
|
||||
|
@ -477,7 +477,7 @@ static void renderExclusionBlocks (
|
|||
for (auto& line : lines)
|
||||
line.add (block, offset, colorExc);
|
||||
|
||||
if (style == "compact")
|
||||
if (axis == "internal")
|
||||
{
|
||||
auto label = format ("{1}", hour);
|
||||
if (start_block == 0 &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue