Created
July 17, 2025 20:03
-
-
Save peak-flow/fa8e87cda45a1ef470cc4792685f6006 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Whiteout Survival: SvS Strategy Dashboard</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <link rel="preconnect" href="https://fonts.googleapis.com"> | |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | |
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet"> | |
| <!-- Chosen Palette: Warm Neutrals with Blue Accent --> | |
| <!-- Application Structure Plan: A task-oriented dashboard design with tabbed navigation was chosen to transform the static report into a dynamic decision-support tool. The structure includes: 1) An Overview/Dashboard for at-a-glance insights, 2) An interactive Points-per-Token Analyzer for deep data exploration, 3) A Daily Strategy section with tabs for Thursday/Friday plans, and 4) A Long-Term Growth section. This non-linear structure allows users to quickly access the information most relevant to their immediate needs (e.g., "What should I do today?") while still providing avenues for deeper analysis, making it far more usable and efficient for a gamer than a linear report. --> | |
| <!-- Visualization & Content Choices: Report Info: The core of the report is the points-per-token data table and daily recommendations. Goal: Allow users to compare item efficiency and view daily plans. Viz/Presentation Method: An interactive HTML table with sorting/filtering and a dynamic Chart.js bar chart for visual comparison. Interaction: Users can click table headers to sort and buttons to filter the data, with the chart updating dynamically. Justification: This interactivity empowers users to analyze data based on their own priorities (e.g., finding the best value for Friday only), turning passive information consumption into active decision-making. Daily plans are in a tabbed view to reduce cognitive load. Library/Method: Vanilla JS for table/tab logic, Chart.js for visualization (Canvas). --> | |
| <!-- CONFIRMATION: NO SVG graphics used. NO Mermaid JS used. --> | |
| <style> | |
| body { | |
| font-family: 'Inter', sans-serif; | |
| } | |
| .chart-container { | |
| position: relative; | |
| width: 100%; | |
| max-width: 900px; | |
| margin-left: auto; | |
| margin-right: auto; | |
| height: 400px; | |
| max-height: 50vh; | |
| } | |
| .tab-button.active { | |
| border-color: #3b82f6; | |
| color: #3b82f6; | |
| background-color: #eff6ff; | |
| } | |
| .filter-button.active { | |
| background-color: #2563eb; | |
| color: white; | |
| } | |
| th { | |
| cursor: pointer; | |
| } | |
| th .sort-indicator { | |
| display: inline-block; | |
| margin-left: 5px; | |
| color: #9ca3af; | |
| transition: transform 0.2s; | |
| } | |
| th .sort-indicator.asc { | |
| transform: rotate(180deg); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-slate-50 text-slate-800"> | |
| <div id="app" class="container mx-auto p-4 sm:p-6 lg:p-8"> | |
| <header class="text-center mb-8"> | |
| <h1 class="text-3xl sm:text-4xl font-bold text-slate-900">Whiteout Survival SvS Strategy</h1> | |
| <p class="text-slate-500 mt-2">Your interactive guide to maximizing points in SvS, Silverfrost, and Enigma events.</p> | |
| </header> | |
| <nav class="flex justify-center border-b border-slate-200 mb-8"> | |
| <button data-tab="overview" class="tab-button active text-sm sm:text-base font-medium py-3 px-4 sm:px-6 border-b-2 border-transparent hover:border-blue-500 hover:text-blue-500 transition-colors">Overview</button> | |
| <button data-tab="analyzer" class="tab-button text-sm sm:text-base font-medium py-3 px-4 sm:px-6 border-b-2 border-transparent hover:border-blue-500 hover:text-blue-500 transition-colors">Points Analyzer</button> | |
| <button data-tab="strategy" class="tab-button text-sm sm:text-base font-medium py-3 px-4 sm:px-6 border-b-2 border-transparent hover:border-blue-500 hover:text-blue-500 transition-colors">Daily Strategy</button> | |
| <button data-tab="growth" class="tab-button text-sm sm:text-base font-medium py-3 px-4 sm:px-6 border-b-2 border-transparent hover:border-blue-500 hover:text-blue-500 transition-colors">Long-Term Growth</button> | |
| </nav> | |
| <main> | |
| <div id="overview-content" class="tab-content"> | |
| <div class="bg-white p-6 rounded-xl shadow-sm border border-slate-100"> | |
| <h2 class="text-2xl font-bold mb-4 text-slate-900">Strategic Overview</h2> | |
| <p class="text-slate-600 mb-6">This dashboard translates the event data into actionable insights. The primary goal is to identify the most efficient use of your Enigma and Silverfrost tokens to maximize your SvS event score. Use the navigation above to explore the detailed points analysis, get specific daily purchase plans, and consider strategies for long-term power growth.</p> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-8 text-center"> | |
| <div class="bg-blue-50 p-4 rounded-lg"> | |
| <h3 class="font-bold text-blue-800">Best Overall Value</h3> | |
| <p class="text-2xl font-bold text-blue-600 mt-1">Mithril</p> | |
| <p class="text-sm text-slate-500">3,600 Points / Token</p> | |
| </div> | |
| <div class="bg-green-50 p-4 rounded-lg"> | |
| <h3 class="font-bold text-green-800">Top Speedup Deal</h3> | |
| <p class="text-2xl font-bold text-green-600 mt-1">1h General Speedup</p> | |
| <p class="text-sm text-slate-500">(from Enigma)</p> | |
| </div> | |
| <div class="bg-purple-50 p-4 rounded-lg"> | |
| <h3 class="font-bold text-purple-800">Top Long-Term Pick</h3> | |
| <p class="text-2xl font-bold text-purple-600 mt-1">Mythic Hero Gear</p> | |
| <p class="text-sm text-slate-500">and Shards</p> | |
| </div> | |
| </div> | |
| <h3 class="text-xl font-bold mb-4 text-slate-900">Top 5 Point-per-Token Items</h3> | |
| <p class="text-slate-600 mb-6">This chart highlights the most efficient items for gaining SvS points. A higher bar means you get more points for each token spent. Use the Points Analyzer tab to filter and sort all available items.</p> | |
| <div class="chart-container"> | |
| <canvas id="overviewChart"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| <div id="analyzer-content" class="tab-content hidden"> | |
| <div class="bg-white p-6 rounded-xl shadow-sm border border-slate-100"> | |
| <h2 class="text-2xl font-bold mb-4 text-slate-900">Points-per-Token Analyzer</h2> | |
| <p class="text-slate-600 mb-6">Here you can analyze the value of every relevant item from the Enigma and Silverfrost shops. Click on table headers to sort the data, or use the filters to narrow down your options. This tool is designed to help you find the absolute best "bang for your buck" based on your specific goals.</p> | |
| <div class="flex flex-wrap gap-2 mb-4"> | |
| <button data-filter="all" class="filter-button active bg-blue-500 text-white text-sm font-medium py-2 px-4 rounded-full transition-colors">All Items</button> | |
| <button data-filter="thursday-friday" class="filter-button bg-slate-200 text-slate-700 text-sm font-medium py-2 px-4 rounded-full hover:bg-slate-300 transition-colors">Thursday & Friday</button> | |
| <button data-filter="friday" class="filter-button bg-slate-200 text-slate-700 text-sm font-medium py-2 px-4 rounded-full hover:bg-slate-300 transition-colors">Friday Only</button> | |
| <button data-filter="growth" class="filter-button bg-slate-200 text-slate-700 text-sm font-medium py-2 px-4 rounded-full hover:bg-slate-300 transition-colors">Long-Term Growth</button> | |
| </div> | |
| <div class="overflow-x-auto"> | |
| <table class="min-w-full divide-y divide-slate-200"> | |
| <thead class="bg-slate-50"> | |
| <tr> | |
| <th data-sort="item" class="px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider">Item <span class="sort-indicator">▼</span></th> | |
| <th data-sort="event" class="px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider">Event <span class="sort-indicator">▼</span></th> | |
| <th data-sort="tokenCost" class="px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider">Token Cost <span class="sort-indicator">▼</span></th> | |
| <th data-sort="svsPoints" class="px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider">SvS Points <span class="sort-indicator">▼</span></th> | |
| <th data-sort="pointsPerToken" class="px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider">Points/Token <span class="sort-indicator">▼</span></th> | |
| </tr> | |
| </thead> | |
| <tbody id="analyzer-table-body" class="bg-white divide-y divide-slate-200"> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </div> | |
| <div id="strategy-content" class="tab-content hidden"> | |
| <div class="bg-white p-6 rounded-xl shadow-sm border border-slate-100"> | |
| <h2 class="text-2xl font-bold mb-4 text-slate-900">Daily Strategy</h2> | |
| <p class="text-slate-600 mb-6">This section provides specific, actionable purchase plans for the final two days of the SvS event. Select a day to see its primary goal, top priority items, and a detailed shopping list to maximize your points for that day's specific reward structure.</p> | |
| <div class="flex border-b border-slate-200 mb-6"> | |
| <button data-day="thursday" class="day-tab-button active flex-1 text-center font-medium py-3 px-4 border-b-2 border-blue-500 text-blue-500">Thursday: Hero Development</button> | |
| <button data-day="friday" class="day-tab-button flex-1 text-center font-medium py-3 px-4 border-b-2 border-transparent text-slate-500 hover:border-slate-300">Friday: Power Boost</button> | |
| </div> | |
| <div id="thursday-strategy" class="day-tab-content"> | |
| <h3 class="text-xl font-bold text-slate-800 mb-2">Thursday's Goal: Hero Development</h3> | |
| <p class="text-slate-600 mb-4">Maximize points from troop training and using Hero Gear materials like Mithril and Essence Stones.</p> | |
| <div class="space-y-4"> | |
| <div class="p-4 border border-slate-200 rounded-lg"> | |
| <h4 class="font-bold">1. Mithril (from Silverfrost)</h4> | |
| <p class="text-sm text-slate-600">This is your best source of points today, offering a staggering **3,600 points per token**. You should aim to buy the full limit of 25.</p> | |
| </div> | |
| <div class="p-4 border border-slate-200 rounded-lg"> | |
| <h4 class="font-bold">2. Essence Stones (from Silverfrost)</h4> | |
| <p class="text-sm text-slate-600">The "single daily reward" is the most efficient at **1,200 points per token**. The standard offer is also excellent value.</p> | |
| </div> | |
| <div class="p-4 border border-slate-200 rounded-lg"> | |
| <h4 class="font-bold">3. Troop Training Speedups (from Enigma)</h4> | |
| <p class="text-sm text-slate-600">Use the hyper-efficient **1h general speedups** (1,800 points per token) to complete any queued troop training.</p> | |
| </div> | |
| </div> | |
| <h4 class="font-bold text-lg mt-6 mb-2">Thursday Purchase Plan</h4> | |
| <table class="min-w-full divide-y divide-slate-200"> | |
| <thead class="bg-slate-50"><tr><th class="px-4 py-2 text-left text-xs font-medium text-slate-500 uppercase">Item</th><th class="px-4 py-2 text-left text-xs font-medium text-slate-500 uppercase">Shop</th><th class="px-4 py-2 text-left text-xs font-medium text-slate-500 uppercase">Tokens</th><th class="px-4 py-2 text-left text-xs font-medium text-slate-500 uppercase">Points</th></tr></thead> | |
| <tbody class="bg-white divide-y divide-slate-200"> | |
| <tr><td class="px-4 py-2">Mithril (x25)</td><td class="px-4 py-2">Silverfrost</td><td class="px-4 py-2">1,000</td><td class="px-4 py-2">3,600,000</td></tr> | |
| <tr><td class="px-4 py-2">Daily Essence Stones (x1)</td><td class="px-4 py-2">Silverfrost</td><td class="px-4 py-2">120</td><td class="px-4 py-2">144,000</td></tr> | |
| <tr><td class="px-4 py-2">1h General Speedup (x25)</td><td class="px-4 py-2">Enigma</td><td class="px-4 py-2">25</td><td class="px-4 py-2">45,000</td></tr> | |
| <tr class="font-bold bg-slate-50"><td class="px-4 py-2">Total</td><td class="px-4 py-2"></td><td class="px-4 py-2">1,145</td><td class="px-4 py-2">3,789,000</td></tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| <div id="friday-strategy" class="day-tab-content hidden"> | |
| <h3 class="text-xl font-bold text-slate-800 mb-2">Friday's Goal: Power Boost</h3> | |
| <p class="text-slate-600 mb-4">Maximize points from a wider range of activities, including pet advancement, speedups, and gear upgrades.</p> | |
| <div class="space-y-4"> | |
| <div class="p-4 border border-slate-200 rounded-lg"> | |
| <h4 class="font-bold">1. Advanced Wild Marks (Enigma & Silverfrost)</h4> | |
| <p class="text-sm text-slate-600">A great way to score big on Friday, offering **750 points per token** from both shops.</p> | |
| </div> | |
| <div class="p-4 border border-slate-200 rounded-lg"> | |
| <h4 class="font-bold">2. Fire Crystals (from Enigma)</h4> | |
| <p class="text-sm text-slate-600">A must-buy for Friday at **1,000 points per token**.</p> | |
| </div> | |
| <div class="p-4 border border-slate-200 rounded-lg"> | |
| <h4 class="font-bold">3. Speedups & Gear Score</h4> | |
| <p class="text-sm text-slate-600">Continue using efficient speedups and upgrade Chief Gear if you have the materials for a significant point boost.</p> | |
| </div> | |
| </div> | |
| <h4 class="font-bold text-lg mt-6 mb-2">Friday Purchase Plan</h4> | |
| <table class="min-w-full divide-y divide-slate-200"> | |
| <thead class="bg-slate-50"><tr><th class="px-4 py-2 text-left text-xs font-medium text-slate-500 uppercase">Item</th><th class="px-4 py-2 text-left text-xs font-medium text-slate-500 uppercase">Shop</th><th class="px-4 py-2 text-left text-xs font-medium text-slate-500 uppercase">Tokens</th><th class="px-4 py-2 text-left text-xs font-medium text-slate-500 uppercase">Points</th></tr></thead> | |
| <tbody class="bg-white divide-y divide-slate-200"> | |
| <tr><td class="px-4 py-2">Adv. Wild Mark (x100)</td><td class="px-4 py-2">Enigma</td><td class="px-4 py-2">2,000</td><td class="px-4 py-2">1,500,000</td></tr> | |
| <tr><td class="px-4 py-2">Fire Crystal (x53)</td><td class="px-4 py-2">Enigma</td><td class="px-4 py-2">106</td><td class="px-4 py-2">106,000</td></tr> | |
| <tr><td class="px-4 py-2">1h General Speedup (x8)</td><td class="px-4 py-2">Enigma</td><td class="px-4 py-2">8</td><td class="px-4 py-2">14,400</td></tr> | |
| <tr class="font-bold bg-slate-50"><td class="px-4 py-2">Total</td><td class="px-4 py-2"></td><td class="px-4 py-2">2,114</td><td class="px-4 py-2">1,620,400</td></tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </div> | |
| <div id="growth-content" class="tab-content hidden"> | |
| <div class="bg-white p-6 rounded-xl shadow-sm border border-slate-100"> | |
| <h2 class="text-2xl font-bold mb-4 text-slate-900">Balancing Gains and Growth</h2> | |
| <p class="text-slate-600 mb-6">A successful SvS event isn't just about winning today; it's about strengthening your account for the future. While maximizing points is important, don't neglect items that provide significant long-term power, even if they offer zero immediate SvS points.</p> | |
| <div class="space-y-4"> | |
| <div class="bg-slate-50 p-4 rounded-lg border border-slate-200"> | |
| <h3 class="text-lg font-bold text-slate-800 mb-2">Prioritize High-Value, Long-Term Items</h3> | |
| <p class="text-slate-600">Items like **Mythic General Hero Shards** and **customMythic Hero Gear** are crucial for your account's strength. You should strongly consider purchasing these, even if it means sacrificing some immediate SvS points. They are investments that will pay dividends in every future battle.</p> | |
| </div> | |
| <div class="bg-slate-50 p-4 rounded-lg border border-slate-200"> | |
| <h3 class="text-lg font-bold text-slate-800 mb-2">The "Hybrid" Approach</h3> | |
| <p class="text-slate-600">To get the best of both worlds, follow this two-step process:</p> | |
| <ol class="list-decimal list-inside mt-2 space-y-2 text-slate-600"> | |
| <li><strong>Secure High-Value SvS Items:</strong> First, purchase the most efficient point-generating items, like the Mithril from Silverfrost and the Fire Crystals from Enigma, to secure a strong position in the event.</li> | |
| <li><strong>Invest in Your Future:</strong> After securing your top SvS point items, use your remaining tokens to purchase long-term growth items. The Mythic General Hero Shards are a fantastic investment, as is the customMythic Hero Gear.</li> | |
| </ol> | |
| </div> | |
| <div class="bg-slate-50 p-4 rounded-lg border border-slate-200"> | |
| <h3 class="text-lg font-bold text-slate-800 mb-2">Don't Neglect Your Pets</h3> | |
| <p class="text-slate-600">The **Advanced Wild Marks** are a perfect example of a hybrid item. They provide a large amount of immediate SvS points on Friday while also contributing significantly to your pets' long-term power growth. These should be a high priority.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', () => { | |
| const data = [ | |
| { category: 'thursday-friday', event: 'Silverfrost', item: 'Mithril', tokenCost: 40, svsPoints: 144000, pointsPerToken: 3600 }, | |
| { category: 'friday-only', event: 'Enigma', item: '1h general speedup', tokenCost: 1, svsPoints: 1800, pointsPerToken: 1800 }, | |
| { category: 'thursday-friday', event: 'Silverfrost', item: 'single daily reward Essence Stones', tokenCost: 120, svsPoints: 144000, pointsPerToken: 1200 }, | |
| { category: 'thursday-friday', event: 'Silverfrost', item: 'Essence Stones', tokenCost: 50, svsPoints: 53200, pointsPerToken: 1064 }, | |
| { category: 'thursday-friday', event: 'Enigma', item: 'Fire Crystal', tokenCost: 2, svsPoints: 2000, pointsPerToken: 1000 }, | |
| { category: 'friday-only', event: 'Enigma', item: 'Advanced Wild Mark', tokenCost: 20, svsPoints: 15000, pointsPerToken: 750 }, | |
| { category: 'friday-only', event: 'Silverfrost', item: 'Advanced Wild Mark', tokenCost: 20, svsPoints: 15000, pointsPerToken: 750 }, | |
| { category: 'thursday-friday', event: 'Silverfrost', item: 'Fire Crystal', tokenCost: 10, svsPoints: 12000, pointsPerToken: 200 }, | |
| { category: 'friday-only', event: 'Silverfrost', item: '1h General Speedup', tokenCost: 10, svsPoints: 1800, pointsPerToken: 180 }, | |
| { category: 'friday-only', event: 'Silverfrost', item: '1hour research Speedup', tokenCost: 10, svsPoints: 1800, pointsPerToken: 180 }, | |
| { category: 'friday-only', event: 'Silverfrost', item: '1hour troop training Speedup', tokenCost: 10, svsPoints: 1800, pointsPerToken: 180 }, | |
| { category: 'friday-only', event: 'Silverfrost', item: '5min General Speedup', tokenCost: 1, svsPoints: 150, pointsPerToken: 150 }, | |
| { category: 'thursday-friday', event: 'Silverfrost', item: 'Fire Crystal (pack of 20)', tokenCost: 30, svsPoints: 40000, pointsPerToken: 133.3 }, | |
| { category: 'growth', event: 'Enigma', item: 'Mythic General Hero Shard', tokenCost: 10, svsPoints: 0, pointsPerToken: 0 }, | |
| { category: 'growth', event: 'Silverfrost', item: 'customMythic Hero Gear', tokenCost: 250, svsPoints: 0, pointsPerToken: 0 }, | |
| { category: 'growth', event: 'Silverfrost', item: 'random Hero Gear Chest', tokenCost: 50, svsPoints: 0, pointsPerToken: 0 }, | |
| ]; | |
| let currentSort = { column: 'pointsPerToken', order: 'desc' }; | |
| let currentFilter = 'all'; | |
| let overviewChart; | |
| const tabButtons = document.querySelectorAll('.tab-button'); | |
| const tabContents = document.querySelectorAll('.tab-content'); | |
| const dayTabButtons = document.querySelectorAll('.day-tab-button'); | |
| const dayTabContents = document.querySelectorAll('.day-tab-content'); | |
| const filterButtons = document.querySelectorAll('.filter-button'); | |
| const tableBody = document.getElementById('analyzer-table-body'); | |
| const tableHeaders = document.querySelectorAll('#analyzer-content th'); | |
| function renderTable() { | |
| const filteredData = data.filter(d => { | |
| if (currentFilter === 'all') return true; | |
| if (currentFilter === 'growth') return d.category === 'growth'; | |
| if (currentFilter === 'friday') return d.category.includes('friday'); | |
| if (currentFilter === 'thursday-friday') return d.category.includes('thursday-friday'); | |
| return false; | |
| }); | |
| const sortedData = filteredData.sort((a, b) => { | |
| const valA = a[currentSort.column]; | |
| const valB = b[currentSort.column]; | |
| let comparison = 0; | |
| if (valA > valB) { | |
| comparison = 1; | |
| } else if (valA < valB) { | |
| comparison = -1; | |
| } | |
| return currentSort.order === 'asc' ? comparison : comparison * -1; | |
| }); | |
| tableBody.innerHTML = sortedData.map(d => ` | |
| <tr class="hover:bg-slate-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-slate-900">${d.item}</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-slate-500">${d.event}</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-slate-500">${d.tokenCost.toLocaleString()}</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-slate-500">${d.svsPoints.toLocaleString()}</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-semibold ${d.pointsPerToken > 1000 ? 'text-green-600' : 'text-slate-600'}">${d.pointsPerToken.toLocaleString()}</td> | |
| </tr> | |
| `).join(''); | |
| } | |
| function renderOverviewChart() { | |
| const ctx = document.getElementById('overviewChart').getContext('2d'); | |
| const chartData = [...data] | |
| .filter(d => d.pointsPerToken > 0) | |
| .sort((a,b) => b.pointsPerToken - a.pointsPerToken) | |
| .slice(0, 5); | |
| if(overviewChart) { | |
| overviewChart.destroy(); | |
| } | |
| overviewChart = new Chart(ctx, { | |
| type: 'bar', | |
| data: { | |
| labels: chartData.map(d => d.item), | |
| datasets: [{ | |
| label: 'Points per Token', | |
| data: chartData.map(d => d.pointsPerToken), | |
| backgroundColor: [ | |
| 'rgba(59, 130, 246, 0.7)', | |
| 'rgba(34, 197, 94, 0.7)', | |
| 'rgba(168, 85, 247, 0.7)', | |
| 'rgba(239, 68, 68, 0.7)', | |
| 'rgba(245, 158, 11, 0.7)', | |
| ], | |
| borderColor: [ | |
| 'rgba(59, 130, 246, 1)', | |
| 'rgba(34, 197, 94, 1)', | |
| 'rgba(168, 85, 247, 1)', | |
| 'rgba(239, 68, 68, 1)', | |
| 'rgba(245, 158, 11, 1)', | |
| ], | |
| borderWidth: 1 | |
| }] | |
| }, | |
| options: { | |
| indexAxis: 'y', | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| scales: { | |
| x: { | |
| beginAtZero: true, | |
| title: { | |
| display: true, | |
| text: 'Points per Token' | |
| } | |
| } | |
| }, | |
| plugins: { | |
| legend: { | |
| display: false | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| return ` Points/Token: ${context.raw.toLocaleString()}`; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| } | |
| tabButtons.forEach(button => { | |
| button.addEventListener('click', () => { | |
| const tab = button.dataset.tab; | |
| tabButtons.forEach(btn => btn.classList.remove('active')); | |
| button.classList.add('active'); | |
| tabContents.forEach(content => { | |
| if (content.id === `${tab}-content`) { | |
| content.classList.remove('hidden'); | |
| } else { | |
| content.classList.add('hidden'); | |
| } | |
| }); | |
| }); | |
| }); | |
| dayTabButtons.forEach(button => { | |
| button.addEventListener('click', () => { | |
| const day = button.dataset.day; | |
| dayTabButtons.forEach(btn => { | |
| btn.classList.remove('active', 'border-blue-500', 'text-blue-500'); | |
| btn.classList.add('border-transparent', 'text-slate-500'); | |
| }); | |
| button.classList.add('active', 'border-blue-500', 'text-blue-500'); | |
| button.classList.remove('border-transparent', 'text-slate-500'); | |
| dayTabContents.forEach(content => { | |
| if (content.id === `${day}-strategy`) { | |
| content.classList.remove('hidden'); | |
| } else { | |
| content.classList.add('hidden'); | |
| } | |
| }); | |
| }); | |
| }); | |
| filterButtons.forEach(button => { | |
| button.addEventListener('click', () => { | |
| currentFilter = button.dataset.filter; | |
| filterButtons.forEach(btn => btn.classList.remove('active')); | |
| button.classList.add('active'); | |
| renderTable(); | |
| }); | |
| }); | |
| tableHeaders.forEach(header => { | |
| header.addEventListener('click', () => { | |
| const column = header.dataset.sort; | |
| if (currentSort.column === column) { | |
| currentSort.order = currentSort.order === 'asc' ? 'desc' : 'asc'; | |
| } else { | |
| currentSort.column = column; | |
| currentSort.order = 'desc'; | |
| } | |
| tableHeaders.forEach(th => th.querySelector('.sort-indicator').style.color = '#9ca3af'); | |
| const indicator = header.querySelector('.sort-indicator'); | |
| indicator.style.color = '#3b82f6'; | |
| indicator.classList.toggle('asc', currentSort.order === 'asc'); | |
| renderTable(); | |
| }); | |
| }); | |
| renderTable(); | |
| renderOverviewChart(); | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment