17.hierarchies 层次结构

246 阅读3分钟

Hierarchies (d3-hierarchy)

Layout algorithms for visualizing hierarchical data.用于可视化分层数据的布局算法。

  • d3.hierarchy - constructs a root node from hierarchical data.从分层数据构造一个根节点
  • node.ancestors - generate an array of ancestors. 生成祖先数组
  • node.descendants - generate an array of descendants.生成后代数组
  • node.leaves - generate an array of leaves.生成叶子数组
  • node.find - find a node in the hierarchy.在层次结构中找到一个节点
  • node.path - generate the shortest path to another node.生成到另一个节点的最短路径
  • node.links - generate an array of links.生成链接数组
  • node.sum - evaluate and aggregate quantitative values.评估和汇总定量值
  • node.count - count the number of leaves.计算叶子的数量
  • node.sort - sort all descendant siblings.排序所有后代兄弟姐妹
  • node[Symbol.iterator] - iterate on a hierarchy.迭代层次结构
  • node.each - breadth-first traversal.广度优先遍历
  • node.eachAfter - post-order traversal.后序遍历
  • node.eachBefore - pre-order traversal.前序遍历
  • node.copy - copy a hierarchy.复制层次结构
  • d3.stratify - create a new stratify operator.创建一个新的分层运算符
  • stratify - construct a root node from tabular data.从表格数据构建根节点
  • stratify.id - set the node id accessor.设置节点 ID 访问器
  • stratify.parentId - set the parent node id accessor.设置父节点 ID 访问器
  • d3.cluster - create a new cluster (dendrogram) layout.创建一个新的集群(树状图)布局
  • cluster - layout the specified hierarchy in a dendrogram.在树状图中布置指定的层次结构
  • cluster.size - set the layout size.设置布局大小
  • cluster.nodeSize - set the node size.设置节点大小
  • cluster.separation - set the separation between leaves.设置叶子之间的间隔
  • d3.tree - create a new tidy tree layout.创建一个新的整洁的树布局
  • tree - layout the specified hierarchy in a tidy tree.在整齐的树中布局指定的层次结构
  • tree.size - set the layout size.设置布局大小
  • tree.nodeSize - set the node size.设置节点大小
  • tree.separation - set the separation between nodes.设置节点之间的间隔
  • d3.treemap - create a new treemap layout.创建新的树状图布局
  • treemap - layout the specified hierarchy as a treemap.将指定的层次结构布局为树状图
  • treemap.tile - set the tiling method.设置平铺方法
  • treemap.size - set the layout size.设置布局大小
  • treemap.round - set whether the output coordinates are rounded.设置输出坐标是否四舍五入
  • treemap.padding - set the padding.设置填充
  • treemap.paddingInner - set the padding between siblings.设置兄弟姐妹之间的填充
  • treemap.paddingOuter - set the padding between parent and children.设置父子之间的填充
  • treemap.paddingTop - set the padding between the parent’s top edge and children.设置父级顶部边缘和子级之间的填充
  • treemap.paddingRight - set the padding between the parent’s right edge and children.设置父级右边缘和子级之间的内边距
  • treemap.paddingBottom - set the padding between the parent’s bottom edge and children.设置父级底部边缘和子级之间的内边距
  • treemap.paddingLeft - set the padding between the parent’s left edge and children.设置父级左边缘和子级之间的内边距
  • d3.treemapBinary - tile using a balanced binary tree.使用平衡二叉树平铺
  • d3.treemapDice - tile into a horizontal row.平铺成水平行
  • d3.treemapSlice - tile into a vertical column.平铺成垂直列
  • d3.treemapSliceDice - alternate between slicing and dicing.在切片和切块之间交替
  • d3.treemapSquarify - tile using squarified rows per Bruls *et. al.*使用每个 Bruls 的平方行平铺
  • d3.treemapResquarify - like d3.treemapSquarify, but performs stable updates.像 d3.treemapSquarify,但执行稳定更新
  • squarify.ratio - set the desired rectangle aspect ratio.设置所需的矩形纵横比
  • d3.partition - create a new partition (icicle or sunburst) layout.创建一个新的分区(冰柱或森伯斯特)布局
  • partition - layout the specified hierarchy as a partition diagram.将指定的层次结构布局为分区图
  • partition.size - set the layout size.设置布局大小
  • partition.round - set whether the output coordinates are rounded.设置输出坐标是否四舍五入
  • partition.padding - set the padding.设置填充
  • d3.pack - create a new circle-packing layout.创建一个新的圆形包装布局
  • pack - layout the specified hierarchy using circle-packing.使用圆形包装布局指定的层次结构
  • pack.radius - set the radius accessor.设置半径访问器
  • pack.size - set the layout size.设置布局大小
  • pack.padding - set the padding.设置填充
  • d3.packSiblings - pack the specified array of circles.打包指定的圆数组
  • d3.packEnclose - enclose the specified array of circles.包含指定的圆数组