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

Two graphs in line-blocks #35

Open
BaljaaSS opened this issue Mar 15, 2023 · 3 comments
Open

Two graphs in line-blocks #35

BaljaaSS opened this issue Mar 15, 2023 · 3 comments

Comments

@BaljaaSS
Copy link

BaljaaSS commented Mar 15, 2023

I am trying to display two graphs in parallel. Even when two Graphviz are put in different div. It only shows one. How can I fix this?

Here is my code.

`import dash_interactive_graphviz
import dash
import dash_html_components as html

app = dash.Dash(name)

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

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

app.layout = html.Div(
[
html.Div(
dash_interactive_graphviz.DashInteractiveGraphviz(id="gv", dot_source=initial_dot_source, fit_button_content=True),
style=dict(display="flex", border="1px solid red", flexGrow=1, position="relative"),
),
html.Div(
dash_interactive_graphviz.DashInteractiveGraphviz(id="gv1", dot_source=initial_dot_source1, fit_button_style=True),
style=dict(display="flex", border="1px solid blue", flexGrow=1, position="relative"),
),
],
style=dict(position="absolute", height="100%", width="100%", display="flex"),
)

if name == "main":
app.run_server(debug=True)
`

@BaljaaSS
Copy link
Author

CSS is correct but somehow it is not shown. What could be the problem?

@florian-burri-csem
Copy link

Same issue. Did you find a workaround?

@DeKi90
Copy link

DeKi90 commented Apr 19, 2024

I had come across that same issue, but forgot to raise it as an issue, when I created #21.
The problem is in the react code, the component's graph doesn't have a unique id so you end up with only one being rendered.

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

3 participants