Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Network. Bug during render of a graph. Page become frozen #3547

Closed
setlab opened this issue Oct 10, 2017 · 2 comments
Closed

Network. Bug during render of a graph. Page become frozen #3547

setlab opened this issue Oct 10, 2017 · 2 comments

Comments

@setlab
Copy link

setlab commented Oct 10, 2017

There is a bug which occurs on a specific graph.
I use vis.Network on a different data to draw graphs. But only this graph is breaking network creation.

NODES:

[
  {
    "id": "164",
    "label": "\u041f\u043e\u0434\u0432\u0437\u0434\u043e\u0448\u043d\u043e-\u043f\u043e\u044f\u0441\u043d\u0438\u0447\u043d\u0430\u044f \u043c\u044b\u0448\u0446\u0430",
    "group": 0,
    "size": 25
  },
  {
    "id": "165",
    "label": "\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u043e\u044f\u0441\u043d\u0438\u0447\u043d\u0430\u044f \u043c\u044b\u0448\u0446\u0430",
    "group": 3
  },
  {
    "id": "166",
    "label": "\u041f\u043e\u0434\u0432\u0437\u0434\u043e\u0448\u043d\u0430\u044f \u043c\u044b\u0448\u0446\u0430",
    "group": 3
  },
  {
    "id": "168",
    "label": "\u0421\u043b\u0430\u0431\u043e\u0441\u0442\u044c \u0432 \u043f\u043e\u0434\u0432\u0437\u0434\u043e\u0448\u043d\u043e-\u043f\u043e\u044f\u0441\u043d\u0438\u0447\u043d\u043e\u0439 \u043c\u044b\u0448\u0446\u0435",
    "group": 3
  },
  {
    "id": "169",
    "label": "\u0423\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0432\u0437\u0434\u043e\u0448\u043d\u043e-\u043f\u043e\u044f\u0441\u043d\u0438\u0447\u043d\u043e\u0439 \u043c\u044b\u0448\u0446\u044b",
    "group": 3
  },
  {
    "id": "173",
    "label": "\u0420\u0430\u0441\u0442\u044f\u0436\u043a\u0430 \u043f\u043e\u0434\u0432\u0437\u0434\u043e\u0448\u043d\u043e-\u043f\u043e\u044f\u0441\u043d\u0438\u0447\u043d\u043e\u0439 \u043c\u044b\u0448\u0446\u044b",
    "group": 3
  },
  {
    "id": "248",
    "label": "\u041e\u0446\u0435\u043d\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0434\u0432\u0437\u0434\u043e\u0448\u043d\u043e-\u043f\u043e\u044f\u0441\u043d\u0438\u0447\u043d\u043e\u0439 \u043c\u044b\u0448\u0446\u044b",
    "group": 3
  },
  {
    "id": "167",
    "label": "\u041c\u0430\u043b\u0430\u044f \u043f\u043e\u044f\u0441\u043d\u0438\u0447\u043d\u0430\u044f \u043c\u044b\u0448\u0446\u0430",
    "group": 4,
    "size": 10
  },
  {
    "id": "247",
    "label": "\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u043e\u044f\u0441\u043d\u0438\u0447\u043d\u043e\u0439 \u043c\u044b\u0448\u0446\u044b",
    "group": 4,
    "size": 10
  },
  {
    "id": "171",
    "label": "\u041f\u043e\u0434\u043d\u044f\u0442\u0438\u0435 \u043d\u043e\u0433 \u0432 \u0432\u0438\u0441\u0435",
    "group": 4,
    "size": 10
  },
  {
    "id": "174",
    "label": "\u041d\u0438\u0437\u043a\u0438\u0439 \u0432\u044b\u043f\u0430\u0434",
    "group": 4,
    "size": 10
  },
  {
    "id": "175",
    "label": "\u041c\u043e\u0441\u0442\u0438\u043a",
    "group": 4,
    "size": 10
  }
]

EDGES:

[
  {
    "from": "164",
    "to": "165"
  },
  {
    "from": "164",
    "to": "166"
  },
  {
    "from": "164",
    "to": "168"
  },
  {
    "from": "164",
    "to": "169"
  },
  {
    "from": "164",
    "to": "173"
  },
  {
    "from": "164",
    "to": "248"
  },
  {
    "from": "169",
    "to": "171"
  },
  {
    "from": "170",
    "to": "171"
  },
  {
    "from": "173",
    "to": "174"
  },
  {
    "from": "173",
    "to": "175"
  },
  {
    "from": "165",
    "to": "247"
  },
  {
    "from": "165",
    "to": "167"
  },
  {
    "from": "16",
    "to": "167"
  },
  {
    "from": "2",
    "to": "167"
  },
  {
    "from": "4",
    "to": "167"
  },
  {
    "from": "165",
    "to": "166"
  }
]

OPTIONS

 {
        nodes:{
            shape: 'dot'
            ,size:15
            ,widthConstraint: {
                maximum: 150
            }
        }
        ,  edges: {
            arrows: 'to'
        }
        , layout: {
            improvedLayout: true
        }
        , interaction:{
            hover:true
            , zoomView: false
        }
    }
@setlab
Copy link
Author

setlab commented Oct 10, 2017

The problem is Options:
widthConstraint: {
maximum: 150
}

If deleted render is ok. Please check the bug.

@wimrijnders
Copy link
Contributor

wimrijnders commented Oct 11, 2017

Duplicate of #3171. Fixed by #3228. The fix will be in the next release.


Just to confirm that it's working now, this is the output from the develop-branch of Network:
download 3

Edit: new image, previous was from a different branch than develop.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants