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

Can't create two edges between two nodes #61

Closed
Dared3vi1 opened this issue Aug 26, 2022 · 2 comments
Closed

Can't create two edges between two nodes #61

Dared3vi1 opened this issue Aug 26, 2022 · 2 comments

Comments

@Dared3vi1
Copy link

Short description

I can't create two edges between two nodes. (two from node a to b).
graph
Second edge replaces the first one.

Code example

Go code
g := graphviz.New()
graph, err := g.Graph()
n, err := graph.CreateNode("n")
if err != nil {
	log.Err(err.Error())
}
m, err := graph.CreateNode("m")
if err != nil {
	log.Err(err.Error())
}
e, err := graph.CreateEdge("e", n, m)
if err != nil {
	log.Err(err.Error())
}
e.SetLabel("e")
f, err := graph.CreateEdge("f", n, m)
if err != nil {
	log.Err(err.Error())
}
f.SetLabel("f")
var buf bytes.Buffer
if err := g.Render(graph, "dot", &buf); err != nil {
	log.Err(err.Error())
}
Dot output
digraph "" {
	graph [bb="0,0,54,124.8"];
	node [label="\N"];
	n	 [height=0.5,
		pos="27,106.8",
		width=0.75];
	m	 [height=0.5,
		pos="27,18",
		width=0.75];
	n -> m [key=e,
	label=f,
	lp="29.33,62.4",
	pos="e,27,36.072 27,88.401 27,76.295 27,60.208 27,46.467"];
}
Generated graph

Screenshot

@denk0403
Copy link
Contributor

denk0403 commented Apr 8, 2023

I'm not sure if this has already been fixed, but I can't reproduce this issue anymore; both edges are present in the output.

@goccy
Copy link
Owner

goccy commented Oct 18, 2024

Thank you, Maybe this problem was fixed.

@goccy goccy closed this as completed Oct 18, 2024
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