d3-indented-tree API example #17
This example demonstrates how the d3-indented-tree API customizes link labels, showing the column *weight* with the unit "Euro," two-decimal formatting, and German locale, then transitions the labels to display the *size* column after two seconds. It also sets link widths proportionally to weight before switching to size. The code uses d3.indentedTree with the linkLabel() and linkWidth() methods, parsing data from an aside#data element and rendering via d3.select().append().call().
AI-generated descriptionAPI examples for d3-indented-tree
myChart.linkLabel() - 2
This example shows how to set the link label based on the column weight, displaying its values with the string "Euro", format the values with 2 decimals and setting the locale property to "DE".
In addition, it shows the transition of the link labels when it is changed from the values of the column weight to the column size.
- 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: