D3 + Vue.js
This example demonstrates an interactive cluster dendrogram visualization built with D3.js v4 and Vue.js 2.2, rendered as SVG. It displays a hierarchical tree structure of the Flare dataset loaded from a CSV file, with nodes representing categories and connections drawn as paths. The chart includes user controls for adjusting width, stroke color, and searching nodes, while also supporting node selection and dynamic addition. Vue’s template syntax binds SVG attributes to computed properties, replacing traditional D3 enter/exit/update methods with reactive data-driven rendering.
AI-generated descriptionThis is a re-write of Cluster Dendrogram with D3 + VueJS.
In order to connect the user interface with the chart, the chart rendering is done by using Vue’s template syntax to bind attributes to the SVG elements.
This can be seen as a replacement for d3.select and the usual enter, exit, update. With Vue, we can use computed properties to make sure that whenever data changes, the representation also updates.
The whole purpose of adding Vue is to benefit from it’s capabilities of building user interface components on top of data models.
Of course, this can also be can be done through native JS or D3 events, but VueJS allows us to build reactive, re-usable components which might come in handy in more complex projects.
forked from <a href='http://bl.ocks.org/getflourish/'>getflourish</a>'s block: <a href='http://bl.ocks.org/getflourish/8b3eeb3076bc3e20099de7f2ef9186b8'>D3 + Vue.js</a>
forked from <a href='http://bl.ocks.org/christianbriggs/'>christianbriggs</a>'s block: <a href='http://bl.ocks.org/christianbriggs/c545524380166c756259c177c2b026d8'>D3 + Vue.js</a>