24-1.selecting elements 选择元素(元素选择器)

99 阅读1分钟

Selecting Elements

  • d3.selection - select the root document element.选择根文档元素
  • d3.select - select an element from the document.从文档中选择一个元素
  • d3.selectAll - select multiple elements from the document.从文档中选择多个元素。
  • selection.select - select a descendant element for each selected element.为每个选定元素选择一个子元素。
  • selection.selectAll - select multiple descendants for each selected element.为每个选定元素选择多个子体。
  • selection.filter - filter elements based on data.基于数据的过滤器元件
  • selection.merge - merge this selection with another.将此选择与另一个选择合并。
  • selection.selectChild - select a child element for each selected element.为每个选定元素选择一个子元素。
  • selection.selectChildren - select the children elements for each selected element.为每个选定元素选择子元素。
  • selection.selection - return the selection.返回所选内容。
  • d3.matcher - test whether an element matches a selector.测试元素是否与选择器匹配。
  • d3.selector - select an element.选择一个元素。
  • d3.selectorAll - select elements.选择元素。
  • d3.window - get a node’s owner window.获取节点的所有者窗口。
  • d3.style - get a node’s current style value.获取节点的当前样式值。