Giter Club home page Giter Club logo

Comments (2)

wallacer avatar wallacer commented on June 15, 2024 1

Thanks for the quick response! The rank operator is exactly what I needed for the ordering. Can't believe I missed it in the api docs.
The date ordering issue was actually far higher priority than lane preference. I think I will tackle the lane operator down the road, and if I do wind up writing a new lane operator that seems generally useful, I'll be sure to submit a PR.

Really appreciate the help.

from d3-dag.

erikbrinkman avatar erikbrinkman commented on June 15, 2024

No dumb questions, and yes, this is possible! d3-dag is written to be modular, so almost any piece can be swapped out for your own code, but sometimes that might mean a lot of extra work. For your questions it's a mixed bag.

  • ordering - the grid operator has an optional rank accessor that can be used to specify how to order things. For your case it should be something like grid().rank(node => node.data.commitTime). The rank need to be a number since typescript doesn't have a good way of specifying orderability, but you should be able to convert to a unix timestamp if its in some other format.
  • lane - the lane assignment is also its own functionality that can be pulled out. and updated as grid().lane(...). However, lane operators are more difficult to write. From your description, you probably want to use something like the single sided lane indexer here. However, the tweaks necessary to get the main branch to always be lane 0 (1), might necessitate rewriting lane, which is most of the layout anyway and therefore might be easy to just spin everything up yourself. However, if you can think of a nice way to upstream the change in a way that's pretty general, or builds nicely off of the existing operators I'd welcome it.

from d3-dag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.