You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reacted by Sriram, Rajeeva Lochan Musunuri, spamguy, Danilo Tuler, Kiril, Alper Sarikaya, Sultan Iman, Ville Kukkonen, Alan Kang, Stefan Reppner and 16 more
Reacted by Pontus Leitzler, Sultan Iman, Jeremy W, Jake Klingler, Bob Massarczyk, Tom Wanzek, t3o-it and AJ
Reacted by David Bruant, Ændra Rininsland, Philip Davis, Adam Krebs, Hang CHEN, Jake Klingler, Peter Asplund, Cong, Kirupakaran, Matt Heise and 2 more
+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 d3 canvas server and the first three are unanswered SO posts. Also, when our startup needed to support older versions of Android that didn't have SVG, we forked the output and used Raphael to do produce static versions. PITA.
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.
The current d3.locale API might make it awkward to have d3-number-format and d3-time-format in separate modules. Maybe that API should be broken up so that d3.formatNumber is localizable and d3.formatTime is localizable without depending on a shared d3.locale object.
The names d3.format and d3.time.format aren’t great. Maybe d3.formatNumber and d3.formatDate? More generally, should “time” be renamed “date”?
The d3-svg module should probably be broken up into separate modules? Also, should it be SVG-specific? Probably we can make it work with Canvas, too. Maybe d3-shapes is a better name? Though note that things like d3.svg.axis will likely remain SVG-specific. And making too many name changes will make migration difficult, so we’ll probably want aliases for anything we rename, anyway.
The d3.transform class will be removed, though d3.interpolateTransform will still be supported.
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?
Reacted by Jesse Ditson, Ian Mathews, Philip Davis, Curran Kelleher, Rajeeva Lochan Musunuri, cvsguimaraes, Alok Pepakayala, Guilherme Simoes, ChazDazzle, Chris Uehlinger and 8 more
Activity
colinmegill commentedon Jun 12, 2015
+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.
colinmegill commentedon Jun 12, 2015
Just checked the google results for
d3 canvas serverand the first three are unanswered SO posts. Also, when our startup needed to support older versions of Android that didn't have SVG, we forked the output and used Raphael to do produce static versions. PITA.mbostock commentedon Jun 12, 2015
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.
colinmegill commentedon Jun 12, 2015
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:
gist gif
Currently react-tween-state expects an integer, so I'm extending it for dates, colors, etc.
colinmegill commentedon Jun 12, 2015
<circle r={this.props.hasChildren ? 3 : 1} />gives me a lot of joy :)mbostock commentedon Jul 1, 2015
Old notes:
chrisvfritz commentedon Dec 4, 2015
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?
mbostock commentedon Dec 4, 2015
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.
chrisvfritz commentedon Dec 6, 2015
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?
sultaniman commentedon Apr 28, 2016
Hi @mbostock when do you plan to rollout
d3-brushas a separate module?Thank you.
[-]Break up d3 into modules.[/-][+]D3 4.0.[/+]mbostock commentedon May 18, 2016
@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.
mbostock commentedon Jun 24, 2016
Current status:
colinmegill commentedon Jun 24, 2016
Woohoo!
On Fri, Jun 24, 2016 at 4:29 PM Mike Bostock [email protected]
wrote:
mbostock commentedon Jun 24, 2016
(Probably won’t blast off until next week. But we are close!)