Drawing Organization Chart with canvas

how to use canvas to draw an organization chart like this, what ideas or cases can be used for reference. The structure is not fixed, and the structure should be rendered dynamically according to the data returned by the background.

Mar.23,2021

first determine the final data structure, whether it is the tree structure you drew or the unordered graph structure. Then write the relationship between the data (that is, the connection mode) according to the back-end data. Later, you can use libraries such as d3. You can refer to the connection style of the tree view in D3.JS

.
Menu