Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8338993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:45:44+00:00 2026-06-09T04:45:44+00:00

In the d3 docs on transitions, it says that transition.select(selector) is approximately equivalent to

  • 0

In the d3 docs on transitions, it says that transition.select(selector) is approximately equivalent to selection.select(selector).transition() saying that the sub-transition version inherits easing, duration and delay from the current transition.

My observation from using both approaches is that sub-transitions must actually have a slightly deeper relationship with the parent transition than the docs imply. What I’ve seen is that if I have 2 transitions that are very closely related to each other, I must use a sub-transition to get both transitions to run perfectly together.

Here’s a contrived example to illustrate the point (although this is simple enough that it would possibly not show the problem in reality). Say I have this in my DOM:

    <g>
        <circle></circle>
    </g>

Transition 1 runs on <g> and applies a “transform=translate(100,0)” to move it horizontally.

Transition 2 runs on <circle> and simply reverses this by applying a “transform=translate(-100, 0)” to move it back horizontally the other way.

The expected result is that the circle does not move at all. But what I actually see depends on how the transitions are set up. If I use 2 separate transitions configured with identical properties for duration and so on, I see the circle appear to jitter just slightly. Presumably this is because the intermediate values passed into the transition interpolators are slightly out of sync.

However, if I use sub-transitions to set up the 2 transitions, it looks perfect.

My question is about the relationship between a transition and a sub-transition. What is the difference in terms of timing and interpolation between using separate transitions versus using sub-transitions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:45:45+00:00Added an answer on June 9, 2026 at 4:45 am

    Subtransitions inherit:

    • the transition id (allowing them to proceed concurrently with the parent transition)
    • the reference time (synchronizing them with the parent transition)
    • the easing function
    • the per-node computed delay
    • the per-node computed duration

    Take a look at transition-select.js and transition-selectAll.js for reference. In your case, it’s the reference time that is needed to synchronize the transitions on the g and circle elements.

    This is a public property (transition.time), so you could set it explicitly if you wanted to synchronize two transitions without creating them through transition.transition or transition.select. But I can’t see any reason not to use a subtransition here.

    Edit: As of D3 3.0, you can use transition.each(callback) to create transitions that inherit transition parameters. This is similar to transition.select and transition.selectAll, except you have more flexibility over how you select elements to create the transition.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been following mozilla developer network's docs and created a transition for my
The docs (and a number of libraries I've looked at) seem to indicate that
java docs says: A pool of strings, initially empty, is maintained privately by the
MSDN docs say that only value types need boxing, but this does not apply
SQLite docs specifies that the preferred format for storing datetime values in the DB
http://docs.python.org/3.0/whatsnew/3.0.html says it lists whats new , but in my opinion, it only lists
MySQL docs say that tables that use the MERGE storage engine can only union
I'm using some CSS transitions like the following: .slide_left { -webkit-transition: all 0.25s ease-in;
I am working with some css animation. But I found that, the CSS transition
I'm trying to implement a suspend event that transitions the object to the :suspended

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.