Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add # Entires to Charts #42

Merged
merged 2 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions static/js/season.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function drawChart(value) {
styles.push(...styles)
styles.push(...styles)


let countSum = 0;
const graphContainer = $(`#${value}`) // get the graph container of the current iter
const graphData = graphContainer.data().graphdata // get the graph data from the container
const stats = graphData.statistic // get the stats from the graph data
Expand All @@ -48,6 +48,7 @@ function drawChart(value) {
]
for (var i = 0; i < graphData.graph.length; i++) {
let current = graphData.graph[i]
countSum += current.count
table.push([current.hero, stats.mean, stats.standard_deviation, current.count, styles[i]]) // push to table
}

Expand Down Expand Up @@ -78,7 +79,7 @@ function drawChart(value) {
var chart = new google.visualization.ComboChart(document.getElementById(value)); // draw chart
chart.draw(data, options);
// add stats to the bottom
graphContainer.append(`<p class='small text-muted'><small>Mean: ${stats?.mean} | Variance: ${stats?.variance} | Standard Deviation: ${stats?.standard_deviation}</small></p>`)
graphContainer.append(`<p class='small text-muted'><small>Mean: ${stats?.mean} | Variance: ${stats?.variance} | Standard Deviation: ${stats?.standard_deviation} | # Entires: ${countSum}</small></p>`)
}

window.addEventListener('resize', function () { // redraw charts on resize
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""This tests the integrity of ./archive/latest.sql by running all calculations on it.
The goal of these tests is to catch errors that would cause invalid data or prevent the server from starting
"""

import os

from dotenv import load_dotenv
Expand Down