Examples do not work for d3 v6+

I noticed that many examples are still based on the older d3 v4.

I prefer to use the latest v6+, but when I bump up the version in the examples, they do not work properly.

Even when I update thecode to work with the breaking chages, e,g, event handling, this doesn’t help.

For example,

Is there another place with the updated version examples?

Those examples are all up to date and running on the current version, 7.8.5.

Can you share an example which demonstrates the problems that you’re encountering?

In order to illustrate better my problem, please have a look at my following example.

The main branch is based on v4 and works just fine.

However, the d3-latest branch is based on v7 and does not work.

There have been some fundamental API changes between v4 and v7, especially in v6.

For a migration guide from v5 to v6 take a look at D3 6.0 migration guide / D3 | Observable

The full list of changes can be found at https://github.com/d3/d3/blob/main/CHANGES.md#changes-in-d3-60