d3-selection
选择允许对文档对象模型(DOM)进行强大的数据驱动转换:设置属性、样式、属性值、HTML或文本内容,等等。使用数据连接的enter和exit选择,你还可以添加或移除元素以对应数据。
🌐 Selections allow powerful data-driven transformation of the document object model (DOM): set attributes, styles, properties, HTML or text content, and more. Using the data join’s enter and exit selections, you can also add or remove elements to correspond to data.
请参阅以下之一:
🌐 See one of:
- 选择元素 - 查询 DOM 元素。
- 修改元素 - 修改所选元素的属性。
- 连接数据 - 将数据连接到选定的元素以进行可视化。
- 处理事件 - 声明用于交互的事件监听器。
- 控制流 - 遍历选定的元素。
- 局部变量 - 将状态附加到元素上。
- 命名空间 - 处理 XML 命名空间。
更多信息,请参见 Observable 上的 d3-selection 集合。
🌐 For more, see the d3-selection collection on Observable.