Comments (11)
Hi, thanks for bringing this up. It's been a while, but I remember trying to upgrade d3.drag
code for some other projects. The breaking change was introduced in d3 v4 with a whole raft of others.
I believe the main culprit was the removal of .origin
and replacment with .subject
which does the same thing but differently. This StackOverflow answer might help figure out how to move forward.
We'd appreciate a pull request if you end up figuring this out and implementing a fix!
Also, side note, but you might be interested in our newer React library that does similar things (example)
from geo-timescale.
I converted this to work in d3 v5 a few years back, see this pull request I made for it: d3 v5 version w concurrent animations, the live plain D3.js demo or the
Observable notebook. D3 v6 breaks some stuff again, I haven’t looked in to it much but I suspect that issue is that v6 handles events differently. In any case the ste from v5 to v6 or v7 is a lot smaller than from v3. Let me know if you’re still working on this, I’m willing to help. There’s also an ICS update that I would like to include.
from geo-timescale.
Wonderful, Dank u zeer! I would be most interested in a D3 V6 (yikes - do in V7 as it is current and would seem like a small change from D6 for this app) implementation that includes the slightly updated ICS timeline names (which I have but cannot recall what they are), as both plain JS and Observable. I am in touch with folks in Queensland who are involved in the ICS activities, and I am sure they would also be interested. What I am thinking is to take your Observable notebook and enhance it to reflect a collaborative project - with a notebook describing the ICS and steps leading up to your implementation.
I have a not-very-good implementation. Yours is much better, but it shows the descriptive info I would like to suggest.
https://observablehq.com/d/f5509b43eb703e68
Sam in Michigan
from geo-timescale.
Heel erg bedankt, Jules. Wish I could help more.
from geo-timescale.
from geo-timescale.
Great, thanks for your interest. I’ll have some spare time next week I’ll take a look next week and start converting it to v7 then. Btw I can’t view the notebook in link you included. Perhaps the notebook isn’t published yet?
from geo-timescale.
I found some time to work on it and made steady progress, see this Observable notebook: Geological Time Scale 2021.
I've refactored the code quite a lot. It now uses D3 v7 and the code is a lot more idiomatic D3 code. It no longer relies on DOM selection through matching class names and id's to make it work and no longer makes uses of d3.scaleLinear()
. The SVG structure is improved too, for example, labels and rect's are children of one cell group. In my opinion it's all a lot cleaner and simpler.
I've added text color from the latest ICS data and added the new periods in the Holocene
I've added breadcrumbs and highlighting of the selected period and its ancestors inspired by this notebook.
Things I have yet to tackle are
- Support for dragging
- Show bit of neighbors on focus of period
- Check if everything is up-to-date with latest ICS data
- Enter a period input
And later on
- Standalone non-Observable version
- Publish to npm
- Switch vertical on narrow screen
from geo-timescale.
from geo-timescale.
Thanks, "Gefeliciteerd" is indeed form of "congratulations" 😄. See the pull request I just made for a standalone (non-Observable) version of the updated d3 v7 geo timescale: Standalone d3 v7 version #6. It doesn't include the "breadcrumbs" that the Observable version has yet.
from geo-timescale.
from geo-timescale.
Closed by pull request #6. I will make new issues for the remaining bugs
from geo-timescale.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geo-timescale.