From 07b0ff8883460b2a90367d1d48a057c5b0700f4b Mon Sep 17 00:00:00 2001 From: as6325400 Date: Sun, 29 Sep 2024 21:25:44 +0800 Subject: [PATCH] Change the line chart to a bar chart. fix --- webapp/templates/jury/analysis/contest_overview.html.twig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webapp/templates/jury/analysis/contest_overview.html.twig b/webapp/templates/jury/analysis/contest_overview.html.twig index 97b214a2cd..0e63c63a33 100644 --- a/webapp/templates/jury/analysis/contest_overview.html.twig +++ b/webapp/templates/jury/analysis/contest_overview.html.twig @@ -406,18 +406,17 @@ for (let minute = 0; minute < contest_duration_minutes; minute++) { } nv.addGraph(function() { - var chart = nv.models.stackedAreaChart() + var chart = nv.models.multiBarChart() // .margin({left: 100}) //Adjust chart margins to give the x-axis some breathing room. // .useInteractiveGuideline(true) //We want nice looking tooltips and a guideline! // .transitionDuration(350) //how fast do you want the lines to transition? // .showLegend(true) //Show the legend, allowing users to turn on/off line series. .showControls(false) + .stacked(true) .x(function(d) { return d[0] }) //We can modify the data accessor functions... .y(function(d) { return d[1] }) //...in case your data is formatted differently. .showYAxis(true) //Show the y-axis .showXAxis(true) //Show the x-axis - .forceX([0, {{ (current_contest.endtime - current_contest.starttime) / 60 }}]) - .forceY([0, max_submissions_per_minute * 1.1 ]) ; chart.xAxis //Chart x-axis settings .axisLabel('Contest Time(minutes)')