Giter Site home page Giter Site logo

Missing bar in simple collumn graph about d4 HOT 12 CLOSED

dnbard avatar dnbard commented on June 27, 2024
Missing bar in simple collumn graph

from d4.

Comments (12)

heavysixer avatar heavysixer commented on June 27, 2024

Would it be possible to see this as a Fiddle so that I can see the issue in action?

Thanks!

from d4.

dnbard avatar dnbard commented on June 27, 2024

@heavysixer Please take a look http://jsfiddle.net/nbww6/ (I've used d3 and d4 libraries from my server, feel free to change them to some CDN or else if you need)

Also it's working fine with different declaration of x in graphData array. You can look at final graph @ http://brackets-rating.herokuapp.com/

from d4.

heavysixer avatar heavysixer commented on June 27, 2024

Hey @dnbard I've started a fiddle example for you, can you flesh it out for me?

http://jsfiddle.net/558hQ/

from d4.

dnbard avatar dnbard commented on June 27, 2024

I've added data to your fiddle http://jsfiddle.net/558hQ/1/ It still miss one bar.
Also, you can remove any number of objects in window.data array to watch that graph to see different missing bars.

from d4.

heavysixer avatar heavysixer commented on June 27, 2024

Yes, you are right, very strange behavior indeed. I am porting this over to a test case so that I can inspect it closer and figure out what is going on.

from d4.

heavysixer avatar heavysixer commented on June 27, 2024

I think it might be the way your for loop is being constructed. Check out the updated example:

http://jsfiddle.net/Qggv5/

I am still trying to understand what the difference is between the two, because the for loop you are using looks completely valid. The odd thing is that the x dimension in this case is an ordinal value, which means that its a categorical scale, not based on a linear progression. I am thinking this must have something to do with it.

from d4.

dnbard avatar dnbard commented on June 27, 2024

It works this way. Still I don't understand what is wrong with loop in my example?

from d4.

heavysixer avatar heavysixer commented on June 27, 2024

Yes, I have tracked the bug down and am working on a patch now. It is a coercion bug in how the key accessor is created by default. Will let you know when I've patched it, after I've tested everything again.

from d4.

heavysixer avatar heavysixer commented on June 27, 2024

@dnbard Please update your copy of d4 and everything should work nicely for you. Thanks for finding and submitting this bug to me! Your fiddle example should work now too, because its bound to the latest version of d4.

from d4.

dnbard avatar dnbard commented on June 27, 2024

Can i use the CDNs for d3.js and d4.js from that Fiddle in my projects ?

from d4.

heavysixer avatar heavysixer commented on June 27, 2024

@dnbard I would not use the d4.js file because it is always bound to the latest master, and that should be considered unstable. I do believe that you can use the d3.js from the CDN but again I am not totally sure.

from d4.

dnbard avatar dnbard commented on June 27, 2024

@heavysixer ok, I'll stick with stable version of libraries.

from d4.

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.