Questions tagged [jgraph]

JGraph is graph visualization library

JGraph is graph visualization library. An open source Java library offering professional support is available.

134 questions
8
votes
5 answers

Getting all edges going out from a node in jgrapht

I am trying to randomly traverse through the graph in jgrapht (until I find some target node). To do it, I need to start at the sourceNode, randomly pick any coming out edge and follow it. I know there there is a method getAllEdges(sourceVertex,…
TheMP
  • 8,257
  • 9
  • 44
  • 73
7
votes
1 answer

how to validate incoming edge towards source from target in mxgraph

Hi i'm facing a problem with respect to edge validation Note: any approach is most welcomed but should solve the problem below is my requirement source can have any following Action_* like this Source -> Action_1 -> Action_2 i want to avoid any…
EaBengaluru
  • 131
  • 2
  • 17
  • 59
7
votes
1 answer

after decoding xml and rendering back on to the canvas graph cell is not showing in mxgraph

I'm able to decode graph xml model successfully but the cell is not visible until the drag below GIF shows my problem Question: I want to load the graph fully for the 1st(now showing only div) time also without need for drag Here is how I'm doing…
EaBengaluru
  • 131
  • 2
  • 17
  • 59
7
votes
1 answer

How to create a line connection mxGraph

I am trying to create a line connection on click an image icon, I have tried the same using the wires.html example. But it is not working. I am using react with mxGraph. How to implement this. Is there any way to achieve…
Jithin Varghese
  • 2,018
  • 3
  • 29
  • 56
7
votes
1 answer

How to draw a SimpleWeightedGraph on a JPanel?

I have a SimpleWeightedGraph and I want to draw it on a JPanel in a JFrame. Unfortunately nothing is drawn. I read this article. They are using a ListenableDirectedGraph so I tried a ListenableUndirectedGraph with no success. public class…
Willi Mentzel
  • 27,862
  • 20
  • 113
  • 121
4
votes
1 answer

mxGraph - Some Shapes Not Rendering Correctly in ReactJS Application

I'm creating a React component which will render a graph by using an XML string with mxGraph. The graph is rendering inside the component, but some shapes, such as circles, diamonds, and swimlanes, are not rendering correctly; they appear as simple…
Rudy
  • 436
  • 3
  • 19
4
votes
1 answer

Change label on an mxgraph cell/vertex

I've created an interface, including mxgraph (javascript), that allows a user to click on a cell and edit the cell's label in a regular form text input that's separate from the graph. I'd like to change the cell's label after the user saves the…
Gary C.
  • 41
  • 1
  • 3
4
votes
1 answer

JGraphX - Autolayout edges only

Is there anyway i can a run auto-layout on graph edges only? I have a lot of fixed vertexes that i do not want to move/rearrange, but i do want to fix edges that overlap my cell/vertexes. Is there any way to do this?
MarkNL
  • 41
  • 2
4
votes
1 answer

(JGraph/mxGraph) Return selected cells

So after the user selected a few cells and pressed a button, I need to have those cells properties like position, size and stuff. So how do I make a method that'll only return me the cells that the user selected?
Fagundes
  • 119
  • 10
4
votes
1 answer

How can I integrate stanford parser software in my java program?

I have to develop a project in java that uses a Stanford parser to separate the sentences and has to generate a graph that shows the relation between the words in a sentence. for example: Ohio is located in America. Output: the image shows the…
Vishnu Kumar
  • 59
  • 1
  • 2
  • 7
4
votes
1 answer

JGraphX Takes a Long Time to Construct Graph

I'm constructing a graph with JGraphX. Using the following code, it takes an inordinately long time to build compared to similar graph implementations like JGraphT. Why would this be? The vertices are created quickly, but the nested loops that…
sehcheese
  • 165
  • 2
  • 8
4
votes
1 answer

mxGraph cell resize and graph layout

I'm having problems with resizing cells and built-in mxGraph layouts. If I put a cell on canvas, and I try to resize it, even for a pixel, it grows huge, something like 50000px x 30000px, so it streches my whole canvas, and of course it is…
Luka Siric
  • 335
  • 1
  • 5
  • 14
2
votes
1 answer

How to determine which side of connection is connected in mxgraph

I have problem something like this a decision has 3 side Input, Yes, No. I want to determine the arrow is connected to which of them. Here is how I'm going to connect Connected from Yes Question: how to know connection is connected to whether…
EaBengaluru
  • 131
  • 2
  • 17
  • 59
2
votes
2 answers

How to drag html shapes into mxgraph canvas

I want to drag and drop those 3 shapes into mxgraph canvas (which is the black area). Note: I want to fully preserve the drag element on the canvas, including shape, size, color, text, etc. I don't know whether insertVertex does it work. Dragging…
EaBengaluru
  • 131
  • 2
  • 17
  • 59
2
votes
1 answer

How to create multiple tabs or sheets or pages in mxGraph?

Draw.io has the feature of multiple pages with a tab view in the bottom. But to integrate that into mxgraph graph editor, it seems like an overkill. I'm looking for a simpler solution or some sort of workaround.
1
2 3
8 9