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.

D3 project Bar Chart: Test not aligned with description.

See original GitHub issue

Problem description:

The test for the Bar Chart project in the Data Visualization category is not aligned with the corresponding user stories.

User Story #10: The data-date attribute and its corresponding bar element should align with the corresponding value on the x-axis.” does not specify that the x-axis may only contain years instead of full dates.

Description and corresponding test

That test passes dataType = 'year' into areShapesAlignedWithTicks which, in getTickValue only returns the innerHTML of the tick, while parsing out the year of the date in the tooltip (getShapeValue).

Expected behaviour would be that this is either documented in the requirements (instead of only the working example) or that the test be made more lenient.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
moT01commented, Oct 19, 2021

Fixed via the linked PR 👍 Thanks everyone 🎉

1reaction
FrankGrimmcommented, May 6, 2021

Do you have an example project that was having this issue @FrankGrimm?

No, sorry, I was just helping a friend that took the course back then and thought I’d file an issue on it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can you help with my D3 Bar Chart project ? test #10 #11
However it doesn't seem like the test is checking for this. The test seems to check for alignment. And my code fails.
Read more >
D3 bar graph X-ticks not aligning - Stack Overflow
I am making a bar graph using D3 but when I plot the bar graph the x-ticks are not aligning under the bars....
Read more >
How to make a bar chart using D3.js - YouTube
In this project, we use D3.js to make a barchart with tooltip that shows the year and GDP for the part of the...
Read more >
Create a Bar Graph Using D3.js in Simple Steps | D3 Bar Chart
From this D3.js Bar Chart article you can discover ways to create beautiful, interactive JavaScript bar charts and graphs in a few steps ......
Read more >
Over 1000 D3.js Examples and Demos - TechSlides
There are many D3 examples online but I have not seen such a big ... Basic Gantt Chart ... Most simple d3.js stack...
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