Code Monkey home page Code Monkey logo

Comments (6)

theiliad avatar theiliad commented on June 11, 2024 3

bumping

from d3-transition.

mbostock avatar mbostock commented on June 11, 2024 1

Per the README, emphasis added:

If the name is a transition instance, the returned transition has the same id and name as the specified transition. If a transition with the same id already exists on a selected element, the existing transition is returned for that element. Otherwise, the timing of the returned transition is inherited from the existing transition of the same id on the nearest ancestor of each selected element. Thus, this method can be used to synchronize a transition across multiple selections, or to re-select a transition for specific elements and modify its configuration.

If you’re seeing this error, it’s either because (1) the transition has expired (not evident from your code snippet, but you didn’t share a complete working example so it’s impossible to say) or (2) the “blah blah” elements you are selecting are not descendant elements of the transition t.

from d3-transition.

theiliad avatar theiliad commented on June 11, 2024 1

In case anyone else is having these kinds of issues. I ended up using .call() to handle my transitions

image

image

from d3-transition.

mbostock avatar mbostock commented on June 11, 2024

(This happens in 3.0 because of #59; in earlier versions, it would silently ignore the t argument when the transition was not found.)

from d3-transition.

theiliad avatar theiliad commented on June 11, 2024

@mbostock I'm usually good w reading the d3 docs and figuring stuff out, however I still don't understand what could be happening.

Here's how I use transitions:

I've got a factory:
https://github.com/carbon-design-system/carbon-charts/blob/8c27e54319d8aabcccdfcee211acc0c669572cef/packages/core/src/services/essentials/transitions.ts#L20-L39

And I use it like so:
https://github.com/carbon-design-system/carbon-charts/blob/8c27e54319d8aabcccdfcee211acc0c669572cef/packages/core/src/components/axes/grid.ts#L100-L103

That's all working in 5.x, now trying to upgrade to 6.x or 7.x I keep seeing transition 1 not found

I might've misread your docs, but as a naive fix I tried adding an incrementing ID in my factory

image

and I still get the same error.

Could you pls clarify what needs to change?

from d3-transition.

theiliad avatar theiliad commented on June 11, 2024

I still feel like I'm not understanding how transitions are supposed to be working

Is this better?

image

image

from d3-transition.

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.