Tell us what’s happening:
Hello,
I’m totally new to d3. Tests 10, 13, 14 are failing in my project. And actually, I understand why they do so. But no idea how to solve it. Currently, my x axis covers only years without months considered. Thus the x coordinate is the same for each Q of a year.
I went over the curriculum again (if I didn’t overlook something, it is not covered directly), looked to other posts in forum and asked Google. But no chance. Any help is appreciated.
Here is my pen: https://codepen.io/MuazD/pen/zxOwbqR
Many thanks in advance!
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
Challenge Information:
Data Visualization Projects - Visualize Data with a Bar Chart
You passed 11 but failed 10 if you could see what you did there because its the same thing but with a different id
and yAxis
. Good luck
Hi @freakjr008
Your chart goes in the right direction!
Try to answer the following questions and see if that leads to an improved answer?
- Why is your project only showing data for January - I think… - as
data-date
? Are you ommiting data?
- Why do you have a sort of “year” conversion in the x-axis? Should be that axis a numeric type?
- Should you treat a “date” as a date type, or as a number or string?
All your decisions can be fully justifiable for some cases, I just wonder if they are justifiable for this exercise.
Let me know if this helps?
Thank you very much to both of you!
I have finished the project 
@evaristoc
Why is your project only showing data for January - I think… - as data-date
? Are you ommiting data?
Thankfully I was already aware of the fact, that only data for January was shown. This was the case because already set up the correct height of the bars without fixing the issue with x axis. I thought it will automatically be fixed when I fix the x axis. And voila 
Why do you have a sort of “year” conversion in the x-axis? Should be that axis a numeric type?
Should you treat a “date” as a date type, or as a number or string?
The funny thing is I had already found out to treat it as a “date” and tried to apply it likewise. But, I had terribly missed a small detail which led my implementation to not work at all. Hence I was kinda desperate.
Following your hint I have made another try and found that little issue → I wasn’t converting the type to “Date” when saving the related data into the related array.
1 Like