Giter Site home page Giter Site logo

Better layouts for tar_visnetwork about targets HOT 2 CLOSED

mem48 avatar mem48 commented on June 11, 2024
Better layouts for tar_visnetwork

from targets.

Comments (2)

mem48 avatar mem48 commented on June 11, 2024 1

I case anybody else has this problem I used

net = tar_network(TRUE)
nodes = net$vertices
edges = net$edges

names(nodes)[1] = "id"
nodes$label = nodes$id

visNetwork(nodes, edges) %>%
  visEdges(arrows = "to") %>% 
  visIgraphLayout(layout = "layout_with_sugiyama", smooth =TRUE)

Which gives access to all the layouts described in https://igraph.org/r/doc/layout_.html

from targets.

wlandau avatar wlandau commented on June 11, 2024

tar_network() returns a visNetwork object that you can modify directly. And tar_network() returns the node and edge information so custom graphs can be created.

I haven't seen a way to achieve a hierarchical layout in visNetwork which is as nice as the mermaid.js graph in terms of the positioning of the edges. I will consider it if a really good set of options becomes available, but as far as I know visNetwork does not support this.

from targets.

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.