Skip to content

Dash_interactive_graphviz component always scales to full browser window #37

@linush-vk

Description

@linush-vk

Hello,

I'm facing an issue where the dash_interactive_graphviz component always scales to the size of the whole browser window. It seems to first initialize in the size of the parent (e.g. parent div), and then it promptly rescales to fit the entire screen.

I constructed an example from the usage.py script:

import dash
import dash_interactive_graphviz
from dash import html

app = dash.Dash(__name__)

initial_dot_source = """
digraph  {
node[style="filled"]
a ->b->d
a->c->d
}
"""

app.layout = html.Div(
    dash_interactive_graphviz.DashInteractiveGraphviz(
        id="gv", dot_source=initial_dot_source
    ),
    style={"width": "500px", "height": "500px", "display": "block"},
)

if __name__ == "__main__":
    app.run_server(debug=True)

Please tell me if I'm missing something which alleviates this behaviour, as I'm very new to HTML/CSS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions