Skip to content

Commit 95a77f7

Browse files
committed
pad x axis in timeline view
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f69154b commit 95a77f7

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

codespeed/commits/git.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@ def getlogs(endrev, startrev):
5252
else:
5353
logfmt = '--format=format:%h%x00%H%x00%at%x00%an%x00%ae%x00%s%x00%b%x1e'
5454

55+
max_log_entries = getattr(settings, 'GIT_MAX_LOG_ENTRIES', 30)
56+
5557
cmd = ["git", "log", logfmt]
5658

5759
if endrev.commitid != startrev.commitid:
60+
cmd.append("-n%d" % max_log_entries)
5861
cmd.append("%s...%s" % (startrev.commitid, endrev.commitid))
5962
else:
6063
cmd.append("-1") # Only return one commit

codespeed/static/js/timeline.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ function renderPlot(data) {
306306
x: xAxisOpts,
307307
y: { valueRange: [0, null] }
308308
},
309+
xRangePad: 20,
309310
connectSeparatedPoints: true,
310311
underlayCallback: function(canvas, area, g) {
311312
versionBoundaries.forEach(function(b) {
@@ -417,6 +418,7 @@ function renderMiniplot(plotid, data) {
417418
x: { drawAxis: false, drawGrid: false },
418419
y: { drawAxis: false, drawGrid: false, valueRange: [0, null] }
419420
},
421+
xRangePad: 20,
420422
connectSeparatedPoints: true,
421423
highlightCircleSize: 0
422424
}

0 commit comments

Comments
 (0)