Comments (6)
Nice! A minor improvement could be to use d3.geo.interpolate for center.
from d3-plugins.
That reminds me, there’s a related problem where the interpolated projection can get out of sync with its a & b projections if their center or translate changes after alpha is set. I debate whether it’s a requirement that the interpolated projection be a “view” on its constituent projection, but at the same time there’s no way to take a snapshot of a projection so the alternative is to allow undefined behavior.
Maybe it would be cleaner to interpolate raw projection functions instead, but then you’d have to expose some other API for interpolating changes to scale, center, translate, rotate, etc. Also that would avoid trying to interpolate changes in clipping behavior, which isn’t possible.
from d3-plugins.
Perhaps we should consider adding projection.copy()
, similar to scale.copy()
? I think we’ve come across other situations where it might have been useful in the past.
from d3-plugins.
I’m not sure if it’s really possible to copy projections with custom streams though, like the current implementation of d3.geo.hammerRetroazimuthal.
from d3-plugins.
Another idea could be to allow projection.center(null)
, which would disable center altogether.
from d3-plugins.
Is there any improvement since then? I can't find any other solution to interpolate projections.
Btw, I find this solution pretty complex. For example, how to add an invert
method, or how to animate clipAngle
, etc. Also, why this fails with Mercator projection?
Maybe d3-geo (or d3-geo-projection) should add a built-in function?
If I'm totally off-topic, please let me know ;-)
from d3-plugins.
Related Issues (20)
- The position of node is wrong when node has a layer not be the last layer
- effect of superformula.size doesn't seem predicable
- Link endpoints not being set correctly HOT 1
- instead of using size[0], width variable will trigger wrong size of the sankey diagram
- [d3.geo.tile] Tiles don't render in correct position when zoom >=14 in IE/Edge
- Is it possible that making contours more smooth?
- Extraneous point in d3-hexbin hex generator? HOT 2
- Flickering in d3.geo.tile HOT 3
- Node without a Link
- How to rotate the hexagon 90° HOT 3
- fisheye: support zoom
- Officially maintained on npm? HOT 2
- Loops within Sankey HOT 1
- Support for v4 HOT 1
- New typescript version of superformulas - license concern
- d3v4 horizon HOT 1
- d3.geom.contour dead loop HOT 2
- fixed bug in resolveCollisions(), please verify and commit. HOT 1
- Graph Rollup use node.id but index HOT 1
- AuthaGraph HOT 1
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 d3-plugins.