]> git.sesse.net Git - pkanalytics/commitdiff
Somewhat nicer formatting for team-wide stats.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 27 Jul 2023 10:24:11 +0000 (12:24 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 27 Jul 2023 10:24:11 +0000 (12:24 +0200)
ultimate.js

index b5bc2147034c4765ad41c1eda4aabc6062d7bdbd..87c976ad7e4ac835820587392f14fcd105132ffe 100644 (file)
@@ -935,8 +935,8 @@ function make_table_team_wide(players) {
        {
                let header = document.createElement('tr');
                add_th(header, '');
-               add_th(header, 'Our team');
-               add_th(header, 'Their team');
+               add_th(header, 'Our team', 6);
+               add_th(header, 'Their team', 6);
                rows.push(header);
        }
 
@@ -944,7 +944,9 @@ function make_table_team_wide(players) {
        {
                let row = document.createElement('tr');
                let name = add_3cell(row, 'Turnovers generated', 'name');
+               add_3cell(row, '');
                add_3cell(row, globals.turnovers_won);
+               add_3cell(row, '');
                add_3cell(row, globals.turnovers_lost);
                rows.push(row);
        }
@@ -956,8 +958,12 @@ function make_table_team_wide(players) {
                let our_clean_holds = make_binomial_ci(globals.clean_holds, globals.offensive_points_completed, z);
                let their_clean_holds = make_binomial_ci(globals.their_clean_holds, globals.defensive_points_completed, z);
                our_clean_holds.desired = 0.3;  // Arbitrary.
+               our_clean_holds.format = 'percentage';
                their_clean_holds.desired = 0.3;
+               their_clean_holds.format = 'percentage';
+               add_3cell(row, globals.clean_holds + ' / ' + globals.offensive_points_completed);
                add_3cell_ci(row, our_clean_holds);
+               add_3cell(row, globals.their_clean_holds + ' / ' + globals.defensive_points_completed);
                add_3cell_ci(row, their_clean_holds);
                rows.push(row);
        }
@@ -969,8 +975,12 @@ function make_table_team_wide(players) {
                let our_clean_breaks = make_binomial_ci(globals.clean_breaks, globals.defensive_points_completed, z);
                let their_clean_breaks = make_binomial_ci(globals.their_clean_breaks, globals.offensive_points_completed, z);
                our_clean_breaks.desired = 0.3;  // Arbitrary.
+               our_clean_breaks.format = 'percentage';
                their_clean_breaks.desired = 0.3;
+               their_clean_breaks.format = 'percentage';
+               add_3cell(row, globals.clean_breaks + ' / ' + globals.defensive_points_completed);
                add_3cell_ci(row, our_clean_breaks);
+               add_3cell(row, globals.their_clean_breaks + ' / ' + globals.offensive_points_completed);
                add_3cell_ci(row, their_clean_breaks);
                rows.push(row);
        }