dash14 / v-network-graph

An interactive network graph visualization component for Vue 3
https://dash14.github.io/v-network-graph/
MIT License
495 stars 44 forks source link

Different force configuration for different types of nodes #7

Closed markus-ebner closed 2 years ago

markus-ebner commented 2 years ago

Is it possible to have a different force configuration for different nodes/edges?

dash14 commented 2 years ago

Unfortunately, this is not possible with only the features provided by v-network-graph. However, it may be possible to achieve this by doing the following:

The view.layoutHandler config is specified as follows:

const configs = reactive({
  view: {
    layoutHandler: YourOwnLayoutHandler()
  },
  // ...
})
<v-network-graph
  :nodes="nodes"
  :edges="edges"
  :configs="configs"
/>
markus-ebner commented 2 years ago

Okay, I may need this feature in the future. Thanks for the information about the self written LayoutHandlers, I wasn't aware of this. At least I can develop it myself, if it isn't available at the time. ;)