Git Product home page Git Product logo

Comments (5)

tomwanzek avatar tomwanzek commented on July 19, 2024

@ebrehault I'll give it a look when I have a minute. What version of the d3-ng2-service did you test things with?

from d3-ng2-service.

ebrehault avatar ebrehault commented on July 19, 2024

1.8.0

from d3-ng2-service.

tomwanzek avatar tomwanzek commented on July 19, 2024

I had a quick look. The primary issue is neither with the service nor d3. The bl.ocks usually start with a an html template which contains an svg with pre-set dimensions suitable for the demo. In the case of the one you are exploring: <svg width="500" height="300"></svg>.

In the process of using d3 usually these pre-set dimentions are retrieved as attributes from the selection of the svg element and then used in the code as needed.

When converting such an example, you have to ensure that these dimensions are set, so they can be used e.g. to calculate the tree layout. Your issue disappears, if you change your component template to <svg:svg width="500" height="300"></svg:svg>

While this clearly does not yet give you a very data-driven component yet, it allows you to continue exploring the content tree and then iteratively use more @Input()s to give you more flexibility.

Hope this helps.

from d3-ng2-service.

ebrehault avatar ebrehault commented on July 19, 2024

Oh ok! Well I was definitely not looking in the right place :)
Thank you very much.

from d3-ng2-service.

tomwanzek avatar tomwanzek commented on July 19, 2024

Not to worry. Been there done that... 😉

from d3-ng2-service.

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.