Skip to content

D3 4.0. #2461

Closed
Closed

Description

@mbostock

Activity

  1. added this to the 4.0 milestone on Jun 5, 2015
  2. colinmegill commented on Jun 12, 2015

    @colinmegill

    +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.

  3. colinmegill commented on Jun 12, 2015

    @colinmegill

    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.

  4. mbostock commented on Jun 12, 2015

    @mbostock
    MemberAuthor

    as agnostic as possible about SVG / Canvas

    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.

  5. colinmegill commented on Jun 12, 2015

    @colinmegill

    But many other aspects of D3 don’t care about the visual representation, including layouts.

    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.

  6. colinmegill commented on Jun 12, 2015

    @colinmegill

    <circle r={this.props.hasChildren ? 3 : 1} /> gives me a lot of joy :)

  7. mbostock commented on Jul 1, 2015

    @mbostock
    MemberAuthor

    Old notes:

    • 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.
  8. chrisvfritz commented on Dec 4, 2015

    @chrisvfritz

    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?

  9. mbostock commented on Dec 4, 2015

    @mbostock
    MemberAuthor

    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.

  10. chrisvfritz commented on Dec 6, 2015

    @chrisvfritz

    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?

  11. self-assigned this
    on Mar 3, 2016
  12. sultaniman commented on Apr 28, 2016

    @sultaniman

    Hi @mbostock when do you plan to rollout d3-brush as a separate module?

    Thank you.

  13. changed the title [-]Break up d3 into modules.[/-] [+]D3 4.0.[/+] on Apr 28, 2016
  14. mbostock commented on May 18, 2016

    @mbostock
    MemberAuthor

    @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.

  15. mbostock commented on Jun 24, 2016

    @mbostock
    MemberAuthor

    Current status:

    image

  16. colinmegill commented on Jun 24, 2016

    @colinmegill
  17. mbostock commented on Jun 24, 2016

    @mbostock
    MemberAuthor

    (Probably won’t blast off until next week. But we are close!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions