From 6e9e95a0ddd02bc9b36fb594a2de9ab390148c16 Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 20 Jan 2021 02:15:31 +0100 Subject: Style fixes --- result/index.html | 74 +++++++++++++++++++++++++++++------------------------- result/krafcik.css | 4 +++ result/krafcik.js | 7 ++++-- 3 files changed, 49 insertions(+), 36 deletions(-) diff --git a/result/index.html b/result/index.html index a6b057b..1d61ce7 100644 --- a/result/index.html +++ b/result/index.html @@ -45,40 +45,46 @@ - -
-
- -
-
- -
-
- +
+ -
- +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
@@ -86,6 +92,7 @@
Browary o co najmniej 10.000 ocen. Piwa o co najmniej 15 ocenach, o określonym ABV i dodane w 2020 lub wcześniej.
Liczba ocen przeliczana per miesiąc od czasu dodania; dla piw nieprodukowanych: max. 12 miesięcy.
+ Kooperacje liczone do jednego browaru, zgodnie z "głównym" oznaczeniem na Untappd.
Dane pobrane z Untappd .
@@ -105,7 +112,6 @@ - diff --git a/result/krafcik.css b/result/krafcik.css index af4f65b..be4274c 100644 --- a/result/krafcik.css +++ b/result/krafcik.css @@ -1,6 +1,10 @@ html, body { max-width: 100%; +} + +body { overflow-x: hidden; + overflow-y: scroll; } #date-slider { diff --git a/result/krafcik.js b/result/krafcik.js index ba8ccf9..77fbda1 100644 --- a/result/krafcik.js +++ b/result/krafcik.js @@ -4,7 +4,6 @@ $(document).ready(function() { if (!tab) { tab = location.hash.replace('#', '') || 'styles'; } - console.log(tab, push); $(`a#${tab}-tab`).tab('show'); if (push) { history.pushState({}, '', '#' + tab); @@ -149,8 +148,8 @@ $(document).ready(function() { var container = $('#chart-tooltip'); if (!container.length) { container = $('
'); - $('body').append(container); } + $(chart.canvas).parent().append(container); if (tooltip.body) { var positionY = chart.canvas.offsetTop; var positionX = chart.canvas.offsetLeft; @@ -213,6 +212,7 @@ $(document).ready(function() { }] }, options: { + maintainAspectRatio: false, legend: { display: false }, @@ -292,6 +292,7 @@ $(document).ready(function() { abvRatingsChart = new Chart.Scatter(ctx, { data: scatterChartData[0], options: { + maintainAspectRatio: false, scales: { xAxes: [abvAxis], yAxes: [ratingAxis] @@ -313,6 +314,7 @@ $(document).ready(function() { abvAverageChart = new Chart.Scatter(ctx, { data: scatterChartData[1], options: { + maintainAspectRatio: false, scales: { xAxis: [abvAxis], yAxes: [averageAxis] @@ -334,6 +336,7 @@ $(document).ready(function() { ratingsAverageChart = new Chart.Scatter(ctx, { data: scatterChartData[2], options: { + maintainAspectRatio: false, scales: { xAxes: [ratingAxis], yAxes: [averageAxis] -- cgit v1.2.3