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 8615949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:30:15+00:00 2026-06-12T05:30:15+00:00

I am crunching my head already for quite a time regarding a strange behavior

  • 0

I am crunching my head already for quite a time regarding a strange behavior of my js script. When I output the value d.parent.x to the console and it shows a different value, than when I print the d.parent to the console and browse for the value through the console.

In the screenshot you see that the object itself has a value x of 525.5, whereas the output of d.parent.x gives me 148.

I m not sure whether this is a js behavior or a behavior of the used D3.js.

I created a jsfiddle for it (source, result). When opening the console in Chrome or Safari you can see the output as in the screenshot.

console screenshot

  • 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-12T05:30:16+00:00Added an answer on June 12, 2026 at 5:30 am

    This is a known issue with console.log – it’s referenced based and will basically end up caching results in some instances when logging objects.

    To get around it you can usually do console.log(JSON.stringify(d.parent)) but this doesn’t work in your case due to cyclic references. I just set a breakpoint in your script and looked at d.parent and d.parent.x.

    enter image description here

    They do indeed result in the same value which is the value that console.log(d.parent.x) shows in your original code.

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

Sidebar

Related Questions

I need to time or benchmark a number crunching application written in C/C++. The
I have the following script for some number crunching #!/bin/bash sudo apt-get update -y
I have a lengthy number-crunching process which takes advantage of quite abit of OpenGL
Running a PHP script that is doing a huge mysql query plus some crunching
I am crunching through many gigabytes of text data and I was wondering if
I wrote a number crunching python code. The calculations involved can take hours. Is
I'm doing some number crunching in C++, and I'm seeing a vast difference in
I'm doing a personal number-crunching project, and I'd like to launch multiple programs on
I am debugging with GDB a crunching number C++ program. It takes 10 minutes
My PHP app has a number-crunching part that is just to slow for PHP,

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.