diff --git a/interface.php b/interface.php index f6d74c6..6bb10f9 100644 --- a/interface.php +++ b/interface.php @@ -394,7 +394,7 @@ define("SVG_REPORT_PIE_RADIUS", 110); define("SVG_REPORT_ANIMATION_DUR", 2); // SVG-kép generálása a jelentésből -function generate_svg_plot($report, $mobile = false): string +function generate_svg_plot($report, $mobile = false, $timing = 8): string { $pie_orig = [SVG_REPORT_WIDTH / 2, SVG_REPORT_HEIGHT / 2]; $pie_radius = SVG_REPORT_PIE_RADIUS; @@ -542,7 +542,8 @@ function generate_svg_plot($report, $mobile = false): string //$color = "rgb(" . random_int(0, 255) . "," . random_int(0, 255) . "," . random_int(0, 255) . ")"; $color = $palette[$idx]; - $anim_delay = SVG_REPORT_ANIMATION_DUR * 2 / 3 * ($sector_count - $idx - 1); + $anim_delay = $timing * ($sector_count - $idx - 1); + //$anim_delay = SVG_REPORT_ANIMATION_DUR * 2 / 3 * ($sector_count - $idx - 1); $svg .= ""; $sector_id = "sector$idx"; $svg .= $svg_path($svg_curve($percent), $color, "$sector_id"); // körcikk @@ -856,7 +857,7 @@ if (cp_verify_id($elector_id)) { case "cp_generate_plot": { $disable_jsoning = true; - $res = generate_svg_plot(generate_report(false)); + $res = generate_svg_plot(generate_report(false), false, 0); } break; case "cp_csv_report":