Questions tagged [mxgraph]

mxGraph is an open source client side JavaScript diagramming library that uses SVG and HTML for rendering. It also provides server-side functionality in Java and .NET for persistence (open and save) functionality, as well as server-side image generation.

mxGraph is an open source client side JavaScript diagramming library that uses SVG and HTML for rendering. It supports all major browsers.

It also provides server-side functionality in Java and .NET for persistence (open and save) functionality, as well as server-side image generation.

Official Website:

https://www.jgraph.com/mxgraph.html

Github Project:

https://github.com/jgraph/mxgraph

437 questions
4
votes
1 answer

Limit the number o edges between vertex in mxGraph

Is there a function to prevent more than onde edge between two vertex in mxGraph? Actually I'm using mxGraph.multiplicities, however it limit the number of edges between all types of vertex and not between on type of edge.
Natanael
  • 389
  • 1
  • 3
  • 14
4
votes
3 answers

mxGraph: Create graph with XML

I am trying to create graph from xml file. My JavaScript Code is- function loadXML() { console.log("Inside loadXML"); var doc = mxUtils.parseXml('
deen
  • 2,185
  • 7
  • 29
  • 53
4
votes
2 answers

Webpack - loader for mxClient, can't load all related objects cleanly in export

The current loader I have is : { test: path.join(__dirname, '../libs/mxClient/js/mxClient.js'), loaders: [ 'exports?mxClient,mxGraph,mxGraphModel' ] } I seem to have to export each object that exists in mxClient in order to be…
user2617566
  • 201
  • 1
  • 2
  • 7
4
votes
2 answers

Decode Xml to mxGraph .Net

I want to execute an operation that is an inversion of what i do when forming xmlString in mxGraph(). mxGraph graph = new mxGraph(); Object parent = graph.GetDefaultParent(); graph.Model.BeginUpdate(); try { …
Egor Rezchikov
  • 431
  • 1
  • 4
  • 8
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

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
3
votes
1 answer

mxgraph avoid edges overlapping nodes or other edges

I'm using mxgraph to visulize a hierarchical layout. I try to create orthogonal and bundled edges with mxHierarchicalLayout and mxEdgeStyle.TopToBottom. But my problem is that the resulting edges are overlapping nodes and other edges, instead of…
3
votes
3 answers

Getting mxGraph Hello World example working in React

I'm a mxGraph and React beginner and would like to get the mxGraph hello world example working in React, just to get a basic understanding of how I can work with mxGraph (and other third party libs). I've started a new React project using…
mottosson
  • 3,283
  • 4
  • 35
  • 73
3
votes
2 answers

mxGraph and it's Types integration with angular 8

When i use any of the mxgraph methods/values my mxgraph is 'undefined' I already tried the viks answer on this thread : How to integrate mxGraph with Angular 4? but even if this give me the typings and intellisense is working fine i still have my…
Anthony D
  • 323
  • 8
  • 19
3
votes
1 answer

Testing mxGraph with react-testing-library

I'm using mxGraph library in React App. I need to create unit tests for components that draw graph. I'm using jest and react testing library. But this library cannot render out mxGraph's elements. Maybe because, while testing it cannot define screen…
Abdulbosid
  • 354
  • 1
  • 2
  • 12
3
votes
4 answers

mxgraph Tooltip doesn't show

I use to mxgraph-js. I want to show tooltip, so I coded as below. But tooltip doesn't show. What is the wrong. graph.setTooltips(true); graph.getTooltipForCell = function(cell) { return 'this is a tooltip'; } I tried to below…
dumpman
  • 131
  • 11
3
votes
3 answers

Mxgraph Reactjs not import mxgraph library

I try to use mxgraph with react project. But I can not use mxgraph with react. I install mxgraph: npm install mxgraph Then I wrote: import { mxGraph, mxGraphHandler, mxGraphModel, ... } from "mxgraph"; InitGraph =()={ let…
dumpman
  • 131
  • 11
3
votes
0 answers

mxGraph, php code to convert XML file into PNG to export image

I'm trying to export an image file (PNG) from mxGraph using PHP. I successfully send the XML string of the graph to the PHP file and I can parse the XML using the mxUtils::parseXml(); command of the library. Still the output I receive is unreadable.…
MarcoRos
  • 33
  • 5
3
votes
0 answers

Move parent vertex on moving constituent element in mxGraph

I am using this example as starting point for my implementation: https://jgraph.github.io/mxgraph/javascript/examples/constituent.html My requirement is that user should be able to select constituent component. However, independent movement of…
Gautam Kumar
  • 941
  • 2
  • 16
  • 37
3
votes
1 answer

Locking an edge to a vertex in mxGraph

Given the javascript Hello World example (mxgraph/javascript/examples/helloworld.html): If you click and drag the edge, it will move so that it is not connected to the vertices anymore. I want to modify helloworld.html, so that the edge cannot be…
matthiash
  • 3,105
  • 3
  • 23
  • 34
1 2
3
29 30