Giter Site home page Giter Site logo

Comments (6)

no-stack-dub-sack avatar no-stack-dub-sack commented on September 11, 2024

@paycoguy @Christian-Paul ☝️

from testable-projects-fcc.

andrealonzo avatar andrealonzo commented on September 11, 2024

@tom-p-uk Thanks Tom for building these D3 projects! I believe we can validate the scatter plot whether the axis values are ascending or descending. It'll just make the code a bit more complicated.

from testable-projects-fcc.

tchaffee avatar tchaffee commented on September 11, 2024

@paycoguy @Christian-Paul @QuincyLarson I need some direction for this failing test. @no-stack-dub-sack you might want to chime in?

The test does not do what it says it does. The test says "The data-yvalue and its corresponding dot should align with the corresponding point/value on the y-axis." But there is no code in that test that checks alignment with the y-axis. What it does, as @tom-p-uk points out, is to check if the cy values (vertical position) of the dots are in ascending order after sorting the dots by data-yvalue. In plain English, it checks if dots with a smaller data-yvalue (faster time) appear above dots with larger data-yvalue.

I looked into seeing if I could check if the dots align correctly with the y-axis labels and it looks pretty complicated. Important also that d3 does that work for you, so I'm not sure how much value that test has.

In the meantime, I think the best I can do is to fix the existing test wording so it better describes what it is testing. It would clarify what's being testing, along with making sure the values are ascending:

"The vertical position of each dot must be related to the data-yvalue attribute of the dot, and dots with a faster time (smaller data-yvalue) should be above dots with a longer time (larger data-yvalue)"

This test, along with test 12, "I can see that the range of the y-axis labels are within the range of the actual y-axis data" should be enough to ensure the dots are aligned with the y-axis, considering that d3 is the one doing that work for the camper.

Thoughts please?

from testable-projects-fcc.

tchaffee avatar tchaffee commented on September 11, 2024

@tbushman I forgot you are working on some d3 issues yourself. If you have any ideas on the above, your comments are of course welcome.

from testable-projects-fcc.

tchaffee avatar tchaffee commented on September 11, 2024

@tbushman that's excellent because I was stuck. You're thinking about this more creatively than I am and I'm looking forward to seeing what you come up with.

from testable-projects-fcc.

andrealonzo avatar andrealonzo commented on September 11, 2024

I looked into seeing if I could check if the dots align correctly with the y-axis labels and it looks pretty complicated.

We tried to do this as well and couldn't find a good way to do it.

I believe I tried making this test work whether the axis was ascending or descending, but the resulting code became really long.

"The vertical position of each dot must be related to the data-yvalue attribute of the dot, and dots with a faster time (smaller data-yvalue) should be above dots with a longer time (larger data-yvalue)"

This sounds alright with me.

from testable-projects-fcc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.