From 9b6eb6784e8c4b619e4601e8c1d5954bb82bcf7d Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 20 Jan 2021 02:29:42 +0100 Subject: Style adjustments --- result/krafcik.css | 1 + result/krafcik.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'result') diff --git a/result/krafcik.css b/result/krafcik.css index be4274c..725156d 100644 --- a/result/krafcik.css +++ b/result/krafcik.css @@ -57,6 +57,7 @@ body { padding: 0.5em; font-size: 0.7em; pointer-events: none; + z-index: 3000; } #chart-tooltip ul { diff --git a/result/krafcik.js b/result/krafcik.js index 77fbda1..b8e88b0 100644 --- a/result/krafcik.js +++ b/result/krafcik.js @@ -153,7 +153,7 @@ $(document).ready(function() { if (tooltip.body) { var positionY = chart.canvas.offsetTop; var positionX = chart.canvas.offsetLeft; - container.html(contentFunction(tooltip, data)).show(); + container.html(contentFunction(tooltip, data)); container.css({ 'top': Math.min( positionY + tooltip.caretY, @@ -173,6 +173,9 @@ $(document).ready(function() { var datasets = data.datasets; $.each(tooltip.dataPoints, function(d, dataPoint) { var beer = datasets[dataPoint.datasetIndex].data[dataPoint.index].ref; + if (d > 0) { + content.append('
'); + } content.append( $('
').append($('').text(beer.name)), $('
').append($('').text(breweries[beer.brewery].name)), -- cgit v1.2.3