Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading from v3 to v7 requires additional renders for my custom gauge #3832

Closed
jjfrankovich opened this issue Mar 22, 2024 · 0 comments
Closed

Comments

@jjfrankovich
Copy link

Hello, I am in the process of upgrading some widgets from d3 v3 to v7 and I have been using the changelog as my guide:

https://github.com/d3/d3/blob/main/CHANGES.md

I was able to fix all the documented stuff like "d3.svg.arc()" to "d3.arc()" and here is the code pens of before and after of it "working".

v3
https://codepen.io/blueShell/pen/abxWBrO

v7
https://codepen.io/blueShell/pen/MWRmbYG

One problem I have for v7 is that I have to re-run the render function multiple times to get it rendering correctly.
To reproduce this, you can get it to re-run the render function by clicking the svg.

in v7 you actually have to click it twice for a total of 3 renders to get it working. Also, I can get it down to 1 click by adding some extra elements beforehand (but none of these extra dom elements were required in the v3 version):

//TODO: why does new d3 require these extra elements setup beforehand?
//gauge.append("g").attr('class', 'arc');
//gauge.append("g").attr('class', 'label');

I was hoping to get some clarification or maybe I missed something in the documentation.
Thank for any help.

@d3 d3 locked and limited conversation to collaborators Mar 22, 2024
@mbostock mbostock converted this issue into discussion #3833 Mar 22, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Development

No branches or pull requests

1 participant