g6/docs/api/graphLayout/mds.en.md
2020-11-13 22:33:15 +08:00

984 B

title order
MDS 8

MDS (Multidimensional scaling) is used for project high dimensional data onto low dimensional space.
img

const graph = new G6.Graph({
  container: 'mountNode',
  width: 1000,
  height: 600,
  layout: {
    type: 'mds',
    workerEnabled: true, // Whether to activate web-worker
  },
});

layoutCfg.center

Type: Array
Example: [ 0, 0 ]
Default: The center of the graph
Required: false
Description: The center of the layout

layoutCfg.linkDistance

Type: Number
Default: 50
Required: false
Description: The edge length

layoutCfg.workerEnabled

Type: Boolean
Default: false
Required: false
Description: Whether to enable the web-worker in case layout calculation takes too long to block page interaction