Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dash_interactive_graphviz component always scales to full browser window #37

Open
linush-vk opened this issue Aug 14, 2024 · 0 comments

Comments

@linush-vk
Copy link

linush-vk commented Aug 14, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant