Skip to content

Generated html is blank #41

@NguyenTuan-Dat

Description

@NguyenTuan-Dat

I'm tried follow the tutorial but output is blank like this image.
Screen Shot 2021-10-11 at 11 05 22

This is my code, can you help me check my mistake?

from treeplotter.tree import Node, Tree, ConnectorStyle, NodeStyle, create_tree_diagram
root = Node(name="root")
arrow_connector = ConnectorStyle(
    arrow_end="classic",  # these come from the Raphaël documentation.
    arrow_width="wide",
    arrow_length="long")
node_style = NodeStyle(
    background_color="#89ADF0",
    border_radius="10px")
root_child = []
for node in tree:
    parent_node = Node(name=some_name, image=img_path)
    childs = []
    childrens_node = tree[node].get_childrens()
    for child in childrens_node:
        child_node = Node(name=some_name, image=img_path)
        childs.append(child_node)
    parent_node.add_children(childs)
    root_child.append(parent_node)
root.add_children(root_child)
print(root.num_children)
connected_tree = Tree(root=root, connector_type="step", connector_style=arrow_connector, orientation="west",
                      node_style=node_style)
create_tree_diagram(tree=connected_tree,
                    save_path="/Users/ntdat/Downloads/tree",
                    background_color="#cf2b2b",
                    webshot=True,
                    verbose=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions