-
Notifications
You must be signed in to change notification settings - Fork 22.9k
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
D3 4.0. #2461
Comments
|
+1 for making the modules as agnostic as possible about SVG / Canvas etc. If the DOM model in general is an implementation detail, the potential scope of the library increases, especially for server side rendering. Easy to imagine using d3.layout.tree() with: https://github.com/Automattic/node-canvas this way. Or with react-native on iOS, as d3.layout.tree() just returns x y pairs and diagonals. |
|
Just checked the google results for |
Yep. Obviously the retained-mode aspects of D3, notably d3-selection and d3-transition, will always require a DOM-like scenegraph. (I say DOM-like because it doesn’t strictly require the DOM: OMG Particles II selects a simple object to store transition state, and DOM-to-Canvas uses custom DOM elements to render to Canvas.) But many other aspects of D3 don’t care about the visual representation, including layouts. I have a more ambitious plan to develop D3’s geometry pipeline that could allow things like d3.svg.line and d3.svg.area to work with either Canvas or SVG. The geometry pipeline is what currently allows d3.geo to output to either SVG or Canvas, as shown in the World Tour. This effort may or may not intersect with Path2D, which will hopefully become more widely supported in the future. If it does, it becomes trivial to take D3’s SVG shapes and use their generated path data with Canvas. But, there are still some nice things about having a generic, composable geometry pipeline. See Pencil Sketch for another example. |
Absolutely... have taken advantage of that with React... see:
I'm generally excited about this methodology because the SVG is more declarative, and the loops are more explicit. Modular D3 helps this a bunch. It will have to handle transitions differently, which is what I'm working on now: Currently react-tween-state expects an integer, so I'm extending it for dates, colors, etc. |
|
|
|
Old notes:
|
|
Really looking forward to this! In my visualization projects, D3 is increasingly being used as a layout engine, with everything else handled by React. I know v4 is still a ways out, but is there a timeline for when an alpha version might be available? |
|
Many of the modules are already available for use: see https://github.com/d3. There’s no explicit timeline for the first “complete” default build of D3 4.0, but my goal is early next year. I expect that the remaining layouts (d3-hierarchy, d3-chord, and the stack layout for d3-shape) will be done this month. I’ll probably tackle d3-force after that. |
|
Wonderful to hear! I really appreciate your work. I'll start trying out some of the available modules in new projects. Are they at a point where it's useful to open issues or submit PRs if something isn't working quite right? |
|
Hi @mbostock when do you plan to rollout Thank you. |
|
@imanhodjaev It’s probably next after I finish d3-zoom, so it should be in the next two weeks. After that, d3-geo and d3-geo-projection. |
|
Woohoo!
|
|
(Probably won’t blast off until next week. But we are close!) |

The text was updated successfully, but these errors were encountered: