How to use the @antv/hierarchy.dendrogram function in @antv/hierarchy

To help you get started, we’ve selected a few @antv/hierarchy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github antvis / G6 / test / unit / graph / tree-graph-spec.js View on Github external
layout: data => {
      return Hierarchy.dendrogram(data, {
        direction: 'LR', // H / V / LR / RL / TB / BT
        nodeSep: 50,
        rankSep: 100
      });
    }
  });
github antvis / data-set / src / transform / hierarchy / dendrogram.ts View on Github external
function transform(dataView: View, options) {
  const root = dataView.root;
  options = Object.assign({}, DEFAULT_OPTIONS, options);

  if (dataView.dataType !== DataSet.CONSTANTS.HIERARCHY) {
    throw new TypeError('Invalid DataView: This transform is for Hierarchy data only!');
  }

  dataView.root = hierarchy.dendrogram(root, options);
}

@antv/hierarchy

layout algorithms for visualizing hierarchical data

MIT
Latest version published 3 months ago

Package Health Score

78 / 100
Full package analysis