Skip to content

Commit d60173c

Browse files
mattipclaude
andcommitted
make tooltip follow cursor on comparison page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 90fefb2 commit d60173c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

codespeed/static/js/comparison.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ var readCheckbox = window.readCheckbox, getLoadText = window.getLoadText;
55

66
var compdata, bench_units, dataCache = {}, chartInstances = [];
77

8+
Chart.Tooltip.positioners.cursor = function(_items, eventPosition) {
9+
return {x: eventPosition.x, y: eventPosition.y};
10+
};
11+
812
var COLORS = [
913
'#4e79a7', '#f28e2b', '#e15759', '#76b7b2',
1014
'#59a14f', '#edc948', '#b07aa1', '#ff9da7',
@@ -235,6 +239,7 @@ function renderComparisonPlot(plotid, unit, benchmarks, exes, enviros, baseline,
235239
maintainAspectRatio: false,
236240
plugins: {
237241
title: {display: true, text: title, font: {size: 15}},
242+
tooltip: {position: 'cursor'},
238243
legend: {
239244
position: 'right',
240245
align: 'start',

0 commit comments

Comments
 (0)