Giter Site home page Giter Site logo

Comments (6)

webmonarch avatar webmonarch commented on May 13, 2024

Did you figure this out? I believe this is implemented, but I cannot readily find an example online.

from d34raphael.

mhemesath avatar mhemesath commented on May 13, 2024

I think I misinterpreted the doc. I assumed that after doing an append, the selection would become the udpate selection. It doesn't appear to do this if you chain the calls, but it does do it if you dont. e.g.

circle.enter().append("circle")
circle
    .attr("cy", 90)
    .attr("cx", String)
    .attr("r", Math.sqrt);

from d34raphael.

webmonarch avatar webmonarch commented on May 13, 2024

Yeah, in that case, after calling data() you get an update selection.

Elements added on enter are available in the update selection (if you have a previous reference to it). You can alternatively call update on the enter selection to get back:

circle
  .enter()
    .append("circle")
  .update()
    .attr(...);

from d34raphael.

mhemesath avatar mhemesath commented on May 13, 2024

Hmm.. that doesn't seem to work.

from d34raphael.

webmonarch avatar webmonarch commented on May 13, 2024

I knew if I replied off the cuff, I was going to get proven wrong. :) I cannot test from this computer, but the area of the code: https://github.com/webmonarch/d3/blob/raphael-compat/src/raphael/selection.js#L112

from d34raphael.

mhemesath avatar mhemesath commented on May 13, 2024

haha, sorry. I didn't use that example.. but tried that in my existing code. It's not a huge deal for now. I'll investigate later and reopen the issue with a working example from D3 and a broken one from d34raphael if I can indeed find one.

from d34raphael.

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.