Visualize Data with Bar Chart FCC

Can someone tell me why I currently can;t see the bar chart? Thank you!

You have a typo in your function

createStuff(data);

function creatStuff(data) { ... }

This is the error that youā€™re getting but itā€™s not shown in codepen console unfortunately.

pen.js:44 Uncaught (in promise) ReferenceError: createStuff is not defined
at pen.js:44

When working in codepen I recommend using devtools for debugging :wink:

1 Like

Thanks! I forgot I could use VSCode for help, lol. Itā€™s been a while since Iā€™ve done any serious projects. :sweat_smile:

Sometimes there is no need for VSCode and codepen is perfectly fine and Iā€™m using it a lot :slight_smile: but instead of their console I do something like this

1 Like

I should be able to see my yaxis now. Why canā€™t I?

Again I can recommend devtools :wink:

When you inspect the svg, you can find that your axis is actually rendered, but somehow transformation is not applied.

Itā€™s not applied because there is a parentheses missing.

.attr('transform', `translate(${50}, ${padding}`)
1 Like

Oops. Hee hee. Thanks.

Iā€™m almost done. But this is not passing one of the tests. I donā€™t know why because i canā€™t understand. Can I have a little help? Thank you! :slightly_smiling_face:

This is the error message.

Tooltipā€™s ā€œdata-dateā€ property should be equal to the active areaā€™s ā€œdata-dateā€ property: expected ā€˜undefinedā€™ to equal ā€˜1970-07-01ā€™

It says that property data-date is undefined. My idea would be to check where are you setting this property.

This is where you set attribute data-date in your tooltip. Iā€™d recommend console logging and checking what actually d is, because it might not be what you expect it to be :wink:

.on("mouseover", (d, i) => {
  console.log(d);
  tooltip.setAttribute("data-date", d[0]);
})

PS Iā€™d recommend creating new topic next time if you have another issue, because this one is already marked as a one with solution so people wonā€™t know that you still need some help :wink:

1 Like