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
1
vote
1 answer

Import Shapes of Custom Library from Draw.io in mxGraph

I'm currently working with the mxGraph library in javascript and I'm trying to create my own shapes in draw.io, to export them, then to reuse them as much as I want in my own program using the mxGraph library. So far, I have tried to create a custom…
Jensyl
  • 25
  • 5
1
vote
0 answers

jGraphX - Import XML and get it's vertices and edges

I am trying to import an xml file into a graph object and then iterate through its children (vertices && edges). I am trying the following but does not work for me String xml = " ...... "; mxGraph graph = new…
NickAth
  • 1,089
  • 1
  • 14
  • 35
1
vote
0 answers

how to do zoom relative to mouse position in mxgraph?

Now I can do zoom relative to mouse position without mxgraph according to this: position-sensitive-zooming Sample code follows: package test; import java.awt.*; import java.awt.event.*; import java.awt.geom.*; import javax.swing.*; public class…
Kevin Zheng
  • 45
  • 3
  • 7
1
vote
0 answers

Can not reconnect port in official mxGraph example

I am quite new to mxGraph library. I was looking at their official examples an like one https://jgraph.github.io/mxgraph/javascript/examples/ports.html , which fits quite good to my planned project. But what I still dont know, why user can not…
Michael
  • 57
  • 5
1
vote
2 answers

Mxgraph - How to disable top/bottom resizing - leaving left and right?

As in the title. I need to disable resizing top-bottom or left-right.
1
vote
1 answer

Is there any way to change the vertex or the edges style from mxgraph?

I made a graph using java and i want to customize the style of it. Is there any easy way? By adding style to them? Here is a part of the code that i used: Its getting some data from a json file that are filled to some Hashmaps. public…
Aris
  • 984
  • 8
  • 22
1
vote
1 answer

Create reversed mxHierarchical layout in mxgraph

Greetings to the community! I am currently creating a custom mxgraph editor and I am converting the graphs using different layouts. I would like to convert my graph layout into an mxHierarchicalLayout but reversed (instead of top-to-down I would…
NickAth
  • 1,089
  • 1
  • 14
  • 35
1
vote
0 answers

Add focus event on an element in a graph with jgraphx

I'm working with JGraphx in Java. I have a BD with a huge ammount of elements, and I want to show in a graph just one node (the "origin") and its related ones to a certain order. The idea is to be able to "click" in one of these nodes, making this…
1
vote
0 answers

JGraphx how to export SVG file from graph

I'm using JGraphx, and I want to put export graph to an SVG file. I tried Document document = (Document) mxCellRenderer.createSvgDocument(safetyTreeGraph, null, 1, Color.WHITE, null);, but I don't know how to output that SVG document to local. So…
lution
  • 81
  • 12
1
vote
1 answer

Move mxCell to new absolute coordinates

I am aware of the method moveCells, but I rather would like to move the cell to a new absolute position (instead of relative deltas). I tried cloning and updating the geometry, without success: var geo = graph.getCellGeometry(cell).clone(); geo.x =…
Boris
  • 338
  • 2
  • 20
1
vote
0 answers

Using mxParallelEdgeLayout for edges between vertices of different parents

I use mxParallelEdgeLayout to allow for multiple parallel edges between vertices. This works fine as long as the vertices share the same parent. However, once I connect vertices which are children of different parents, the automatically chosen…
Boris
  • 338
  • 2
  • 20
1
vote
1 answer

Get a node by ID with Guava Graph

I'm looking for a way to retrieve a node using an identifier, using only the Guava library. I prefer not to use an external HashSet, which I have considered, because my dataset is too big. I would like a way to index all of my graph nodes using an…
1
vote
1 answer

jgraphx: hierarchical layout reduce distance between nodes

I'm using jgraphx to visualize a control low inside a method. Thus, i'm using the mxHierarchicalLayout. But in the result graph the distance between two nodes is too big. (see img) I want to reduce the yellow marked areas. Im adding nodes…
osanger
  • 2,276
  • 3
  • 28
  • 35
1
vote
1 answer

Tooltip position in mxGraph is way off when graph is contained in a div

I'm using the base example of mxGraph which can be found here: graphEditor to start. In the example above, the tooltips open to the right of the icons from the left sidebar. For example, shapes, lines, etc. I have my graph contained in a div,…
user1447679
  • 3,076
  • 7
  • 32
  • 69
1
vote
1 answer

Customize connection inputs and outputs of Jgraph mxCell

In Grapheditor's Sidebar.js, there are cases of createVertexTemplateEntry() call which I am interested in. Particularly the case when image is set as style, namely: this.createVertexTemplateEntry('image;html=1;image=someobject100x100.png', 100,…
Miroslav Radojević
  • 487
  • 1
  • 5
  • 20
1 2
3
8 9