Skip to content

Commit 4accdee

Browse files
as6325400vmcj
authored andcommitted
do not display anything for 0 attempts.
1 parent 2d6f4ff commit 4accdee

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

webapp/templates/jury/analysis/contest_overview.html.twig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,15 @@ nv.addGraph(function() {
345345
d3.select('#graph_problems svg')
346346
.datum(problem_stats)
347347
.call(chart);
348+
// Hide bars with 0 height after rendering
349+
chart.dispatch.on('renderEnd', function() {
350+
d3.selectAll('#graph_problems .nv-bar').each(function(d) {
351+
if (d.value === 0) {
352+
d3.select(this).attr('height', 0);
353+
d3.select(this).attr('y', chart.yAxis.scale()(0));
354+
}
355+
});
356+
});
348357
nv.utils.windowResize(chart.update);
349358
return chart;
350359
});

0 commit comments

Comments
 (0)