From 841109d995614c2b6c30774c00e9708428b1fed3 Mon Sep 17 00:00:00 2001 From: danny Date: Sun, 14 Jun 2026 14:09:32 +0200 Subject: [PATCH] Add live voting pie chart (Chart.js doughnut) for player and host views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Loads Chart.js 4.4.4 from jsDelivr CDN - Canvas elements in #pVoteCard (player) and #hVoteCard (host sidebar) - computeTally() counts only locked votes — no ghost nobody entries - updateVotingChart() creates on first call with 600ms entry animation, then patches data in-place (update 'none') on each poll tick - destroyChart() tears down the Chart.js instance and hides the canvas - Player chart appears once the player has locked their vote (or after resolution); host chart appears whenever the vote tally sidebar is shown - Both charts destroyed and hidden on newRound() - Theme-matched colors (navy, accent, green, red, gold) on dark bg Co-Authored-By: Claude Sonnet 4.6 --- index.html | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) diff --git a/index.html b/index.html index e8e3fbc..030e1a3 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,7 @@ +