question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[beta] test conflicts with challenge requirement.

See original GitHub issue

Challenge add-labels-to-scatter-plot-circles has an issue. User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

This instruction:

Set the x attribute so it’s 5 units more than the value you used for the cx attribute on the circle.

seems to be in conflict with the second test case:

The first label should have text of “34, 78”, an x value of 34, and a y value of 422.

With the above instruction, shouldn’t the value of the x attribute for the text element be 39 and not 34 as the test case states? This is the output received following the above instructions on the developer console:

screen shot 2017-01-29 at 04 50 49

Here is the current code used:

       
<body>
<script>
  const dataset = [
                [ 34,    78 ],
                [ 109,   280 ],
                [ 310,   120 ],
                [ 79,    411 ],
                [ 420,   220 ],
                [ 233,   145 ],
                [ 333,   96 ],
                [ 222,   333 ],
                [ 78,    320 ],
                [ 21,    123 ]
              ];
  
  
  const w = 500;
  const h = 500;
  
  const svg = d3.select("body")
                .append("svg")
                .attr("width", w)
                .attr("height", h);
  
  svg.selectAll("circle")
     .data(dataset)
     .enter()
     .append("circle")
     .attr("cx", (d, i) => d[0])
     .attr("cy", (d, i) => h - d[1])
     .attr("r", 5);
  
  svg.selectAll("text")
     .data(dataset)
     .enter()
     .append("text")
     // Add your code below this line
     .attr("x", (d, i) => d[0] + 5)
     .attr("y", (d, i) => h - d[1])
     .text(d => d[0] + ", " + d[1]);
     
     
     // Add your code above this line
</script>
</body>

The code above still passes the challenge regardless of the stated above reasons.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Manish-Giricommented, Jan 30, 2017

@erictleung Just saw in chat that @cdrainxv was doing the PR when I posted. So I’ll wait for another ‘help wanted’ issue.

1reaction
HKuzcommented, Jan 29, 2017

@cdrainxv - yes, good catch on that test! The x-value used to position the text should be 39, not 34 and @erictleung your suggestion will fix this test message. I just went through the other tests and it looks like they are using the correct numbers, so I think it’s just this second test that needs to be fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Beta Test Agreement: Everything You Should Know
A beta test agreement is a software license contract between a software ... Drafting a beta test agreement can sometimes be challenging for...
Read more >
The Top Challenges Facing the Beta Testing Industry
Another key challenge that many companies face is not having any standardized processes for their program. Having established processes makes running a beta...
Read more >
Key Software Testing Challenges and Solutions | BrowserStack
1. Lack of Communication. Communication gaps, particularly while conveying the software requirements can create hurdles in constructing accurate ...
Read more >
What is Beta Testing? A Complete Guide
This article gives you a complete overview of Beta Testing, thereby explaining its meaning, purpose, need, challenges involved etc in a ...
Read more >
Outcome of drug provocation testing in children with ... - NCBI
Drug hypersensitivity reaction is a common concern in children and beta-lactam (BL) antibiotics are commonly implicated [1,2]. In a review of the inpatient ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found