Skip to content

Commit

Permalink
do not display anything for 0 attempts.
Browse files Browse the repository at this point in the history
  • Loading branch information
as6325400 committed Oct 25, 2024
1 parent 68438a6 commit 1b454b4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions webapp/templates/jury/analysis/contest_overview.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,15 @@ nv.addGraph(function() {
d3.select('#graph_problems svg')
.datum(problem_stats)
.call(chart);
// Hide bars with 0 height after rendering
chart.dispatch.on('renderEnd', function() {
d3.selectAll('#graph_problems .nv-bar').each(function(d) {
if (d.value === 0) {
d3.select(this).attr('height', 0);
d3.select(this).attr('y', chart.yAxis.scale()(0));
}
});
});
nv.utils.windowResize(chart.update);
return chart;
});
Expand Down

0 comments on commit 1b454b4

Please sign in to comment.