2nd part of the fix.

This commit is contained in:
Ralf Teusner
2016-06-17 15:04:17 +02:00
parent 003e89b230
commit 5840b62692

View File

@ -226,20 +226,17 @@ $(function() {
.attr("cx", function(d) { return x(d[1]); }) .attr("cx", function(d) { return x(d[1]); })
.attr("cy", function(d) { return y(d[0]); }); .attr("cy", function(d) { return y(d[0]); });
if (submissionsScoreAndTimeSubmits.length > 0){
svg.append("path") // get rid of the 0 element at the beginning
.datum(submissionsScoreAndTimeSubmits) submissionsScoreAndTimeSubmits.shift();
.attr("class", "line2") }
.attr('id', 'myPath')// new
.attr("stroke", "blue")
.attr("stroke-width", 5)
.attr("fill", "none")// end new
.attr("d", line);//---
svg.selectAll("dot") // Add dots to submits svg.selectAll("dot") // Add dots to submits
.data(submissionsScoreAndTimeSubmits) .data(submissionsScoreAndTimeSubmits)
.enter().append("circle") .enter().append("circle")
.attr("r", 3.5) .attr("r", 6)
.attr("stroke", "black")
.attr("fill", "blue")
.attr("cx", function(d) { return x(d[1]); }) .attr("cx", function(d) { return x(d[1]); })
.attr("cy", function(d) { return y(d[0]); }); .attr("cy", function(d) { return y(d[0]); });