d3-indented-tree API example #23
✓ Published0🌍 Public
EEE2dev
Last edited Dec 30, 2020
Created on Sep 15, 2019
This example demonstrates how the `d3-indented-tree` API can adjust link width in real time. Initially, the chart uses the `linkWidth("size")` method to dynamically size links based on the "size" property of the data, which is loaded from a local `flare.json` file. After a two-second delay, a `window.setTimeout` callback switches the link width to a static value of 100 pixels, overriding the dynamic behavior. The visualization is rendered using D3.js v6 and the `d3-indented-tree` plugin, with data propagated via the `propagateValue` method. This highlights the flexibility of the API for controlling visual encodings.
AI-generated descriptionAPI examples for d3-indented-tree
myChart.linkWidth() - 2
This example shows how to
- set the link width dynamically based on the column "size"
- after 2 seconds, the link width is set statically to a number (100)
- for documentation, go to https://github.com/EE2dev/d3-indented-tree
- for other examples, go to https://github.com/EE2dev/d3-indented-tree#examples
Acknowledgements:
mit Licensed